Want Page Title to show on menu, but not on page

I have set up a static home page. I would like the title, Home, to show on the menu, but not on the page. Can you tell me how to accomplish this? Thank you.

Related posts

Leave a Reply

3 comments

  1. A possible quick fix is to duplicate your page.php or index.php template file, rename it front-page.php, then open it and delete the_title(); and any html tags around it, like <h1> </h1> or whatever the title is wrapped in.

  2. Both Chip & Milo’s answers would work, or, if you have body_classes enabled (so that unique classes are added to each page’s body class) you could just add this to your CSS:

    .home h1 { display: none; }
    

    Depending on the theme that h1 will have a unique style applied to it as well, like:

    .home h1.page-title {display: none; } 
    

    which would be even better, as then you wouldn’t accidentally hide any other tags on that page.

    G’luck.

  3. An alternate approach to Milo’s suggestion is to modify page.php to wrap the_title() in a conditional. e.g. replace this:

    <h1><?php the_title(); ?></h1>
    

    …with this:

    <?php if ( ! is_front_page() ) { ?>
    
        <h1><?php the_title(); ?></h1>
    
    <?php } ?>