WordPress.org

Ready to get started?Download WordPress

Forums

Hide title on homepage (5 posts)

  1. maoski
    Member
    Posted 3 years ago #

    Hi im looking for a way to hide the Home title on my homepage (this is the page title not the browser title), i have searched but not found anything that works, any help greatly appreciated :)

  2. Digital Raindrops
    Member
    Posted 3 years ago #

    Search the forums and there will be loads of replies.

    The theme you are using will have the title in a theme element, you will need to know the file name and the element name of that class or ID.

    It sounds like you are using a page for the 'Home' so that could be page.php, it could be home.php, it could be a custom template page or index.php

    Without more information, theme name, home page setup, and a link to the site, or the structure pasted on pastebin, we can only guess.

    Here is a solution for 'twenty ten'

    David

  3. laptophobo
    Member
    Posted 2 years ago #

    In the (closed) post: http://wordpress.org/support/topic/hide-homepage-title?replies=6 gabesands says to find
    <?php the_title(); ?>
    and then to add some tags which I believe is now supposed to look this:

    <?php if ( is_front_page() ) { ?><?php } else { ?>
    			<?php the_title(); ?>
    		<?php } ?>

    This didn't work for me. But maybe I'm in the wrong file of the theme? The only place I could find "the_title" code was within loop-single.php. It wasn't in index.php, page.php or home.php.

    Any ideas on this, or how to remove the Title from the Home page?

  4. Kirk Wight
    Member
    Posted 2 years ago #

    That conditional PHP code looks a little wacky to me... easier to insert the_title only if we are not on the home page:

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

  5. laptophobo
    Member
    Posted 2 years ago #

    Well, kwight, I've replaced

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

    with

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

    within the loop-single.php (in the theme's folder) and got no change.

    At least, for now, I'm able to hide it using a CSS style.

Topic Closed

This topic has been closed to new replies.

About this Topic