WordPress.org

Ready to get started?Download WordPress

Forums

Remove "Home" Title from front static page Twenty-Ten theme (4 posts)

  1. antorera
    Member
    Posted 3 years ago #

    Hello,

    I'm using the Twenty-ten theme and am using a static page for the home. I don't want the "Home" title to appear on the front page only (the other static pages should keep their titles).

    I looked at the code in loop-page.php and I see it has the call for is_front_page.

    <?php if ( is_front_page() ) { ?>
    						<h2 class="entry-title"><?php the_title(); ?></h2>

    but I'm not sure what to do with it. I have been able to hide the title in past themes (See this forum post). However, this process isn't working.

    I've tried display none in the style sheet as follows:
    .home .entry-title {}
    .post-9 .entry-title {}

    but neither of those worked either.

    The site I'm referring to is here.

    Thanks.

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    I've tried display none in the style sheet as follows:
    .home .entry-title {}
    .post-9 .entry-title {}

    should work - you may need to clear the browser cache to see the effect - press 'CTLR F5' or the 'reload' button onyour browser.

    in loop-page.php, for instance, you could comment the h2 tag, or remove it:

    <?php if ( is_front_page() ) { ?>
    						<!--<h2 class="entry-title"><?php the_title(); ?></h2>-->
    					<?php } else { ?>
    						<h1 class="entry-title"><?php the_title(); ?></h1>
    					<?php } ?>

    btw:
    twenty ten will be overwritten with the next upgrade of your wordpress version; consider creating a child theme http://codex.wordpress.org/Child_Themes

  3. antorera
    Member
    Posted 3 years ago #

    Great! The commenting out trick worked.

    And yes, I will create a child theme. I was just throwing something together quickly first. However, I didn't realize that the twenty-ten theme gets overwritten during a WP update, so good to know if I'm using this theme.

  4. naveen73
    Member
    Posted 2 years ago #

    Thanks. This was really helpfull!

Topic Closed

This topic has been closed to new replies.

About this Topic