Written by me@grafxflow
08 Sep, 2012
0
1,261
If you want to hide the title from appearing in the content on a page in WordPress then it means editing a theme file. The following is based on the Twenty Eleven theme.
QUICK UPDATE: For the below example you can create a front-page.php in your theme folder instead.
For this example I want to hide the 'Home' which appears on the home page.
1. In the WordPress admin choose
Appearance->Editor
2. Then choose from the list on the right
content-page.php
3. Now find where it says
<h1 class="entry-title"><?php the_title(); ?></h1>
and replace it with
<?php
/* Hide the title on the home page */
if( !is_page( array( 'Home' ) ) )
{
?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php
}
?>
4. You can also list several pages using either their name or id number.
<?php
/* Hide the title on several pages */
if( !is_page( array( 12,'contact','Home' ) ) )
{
?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php
}
?>
24 Nov, 2013
07 Nov, 2012
26 Apr, 2018
I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. Thanks for stopping by!
Follow11 Jul, 2023
21 Jun, 2023
Views: 166,099
Views: 40,208
Views: 36,921
Views: 33,516