Support » How-To and Troubleshooting » Removing page title on the page

Removing page title on the page

  • Hello,
    How do I prevent the page title from automatically appearing on the page?
    E.g. On the HOME page, I don’t want to see the title HOME. I just want to see text.

Viewing 15 replies - 1 through 15 (of 17 total)
  • I’d like to know how to do this as well. Does anyone know? The only information I can find is for older versions of WordPress. Those fixes no longer apply.



    Forum Moderator

    This is theme specific. You would need to use CSS to hide the page tiles from graphical browsers.

    I’m just trying to do this on the default Twenty Eleven theme. I want just may main page to have no title showing up right above the page text.

    Moderator Michael


    Forum Moderator

    check if your theme has a page.php, then remove the title code there.

    if your theme does not have a page.php, you could try to find the title code in index.php and wrap it into a conditional tag ( if( is_page() ) ... )

    you could also try and identify the css selector of the page title, and hide the title using css in style.css.

    and the forum has information about this, even as new as for the current default theme Twenty Eleven …

    details depend on your theme.

    There is no title information in the Twenty Eleven theme. Unfortunately, I’m not as advanced with WordPress to know how to do conditional phrases.

    I’d do the CSS, but I only want the front page title to be hidden, not all the page titles.

    I’ve searched for information on Twenty Eleven in the forums, but can’t find it.



    Forum Moderator

    Do not edit the Twenty Eleven theme. It is the default WordPress 3.2 theme and having access to an unedited version of the theme is vital when dealing with a range of site issues.

    Create a child theme for your customisations. Once your child theme is active, we should be able to help with the customisation.

    This is what I used on the main page template:

    <?php if ( is_front_page() ) { ?>
    <h2 class="entry-title">Test</h2>
    <?php } elseif ( is_page_template('customPage.php') ) { ?>
    <p>Do Stuff, ignore header on customPage.php</p>
    <?php } else { ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php } ?>

    However, that doesn’t remove the old title. So now I have two titles on there.

    Moderator Michael


    Forum Moderator

    edit: reply removed to avoid confusion.

    Figured it out thanks to alchymyth’s last comment. Thank you!

    Used this:

    <header class="entry-header">
    <?php if ( is_front_page() ) { ?>
    <h2 class="entry-title">Welcome to your new home.</h2>
    <?php } else { ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php } ?>

    @mr_director, where did you put it?
    I tried to add it in page.php in a child theme
    to twenty eleven…didn’t work!







    I just chopped:

    <h1 class=”entry-title”><?php the_title(); ?></h1>

    out of the content-page that mr_director suggested.

    To remove the page title in Twenty Eleven theme on front page only, add following ‘if’ code to file ‘content_page.php’:

    <?php if ( !is_front_page () ) : ?>
      <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php endif; ?>

    Then on your front page you can make your own header title with the proper css style like this:

    <h1 class="entry-title">Velcome to my homepage</h1>

    You should ofcourse make a child theme with those changes.

    Last week, I deleted the code: <h1 class=”entry-title”><?php the_title(); ?></h1> (just like Deedubs) from the content-page.php and it worked like a dream and the page name/title stopped appearing on each page.
    However, I need to do this again because my site went down and I lost a lot of changes, but this line of code is not there in the contents-page.php (e.g. I can still see the space where I deleted it originally) but the page title is showing up again on every page as though no changes have been made to the content-page.php

    Can anyone explain what has happened to my code! When I say my site went down, I mean I experienced the ‘white/blank screen of death’ and could no longer access/log into my site etc. The site host “reverted my theme (twenty eleven) to the default” so the site was ok again (but with a lot of work lost and default stuff back) but now the code I removed is still ‘removed’ and I don’t see where the page title instruction is being generated from!

    Any ideas how to get around this so I can stop the page title showing up on every page? (or why on earth this is!)
    Thanks!! (total novice)



    this worked for me, put it in style.css in my child theme:

    body.home .entry-title {
    	display: none;
Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Removing page title on the page’ is closed to new replies.