WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Removing the title in home page (static page) (6 posts)

  1. MultiformeIngegno
    Member
    Posted 2 years ago #

    I have a static page as home page.
    How do I remove the <h1 class="entry-title"> ONLY from that page (in home and not if you visit that page "normally" and not as home page)?

    I use the TwentyEleven theme.

    Thanks in advance guys! :)

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    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.

  3. MultiformeIngegno
    Member
    Posted 2 years ago #

    Sorry, I omitted to say that - yes - I'm already using a TwentyEleven child theme. :P

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Copy content-page.php into your child theme and then try changing <h1 class="entry-title"><?php the_title(); ?></h1> to:

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

  5. MultiformeIngegno
    Member
    Posted 2 years ago #

    Yeah!! Works! Thanks a lot! ;)

  6. greenpeas
    Member
    Posted 2 years ago #

    Hey, was just looking to do this as well, Thanks Esmi!!!!

Topic Closed

This topic has been closed to new replies.

About this Topic