WordPress.org

Ready to get started?Download WordPress

Forums

Display Page Title on all except Homepage! (4 posts)

  1. Anonymous
    Unregistered
    Posted 6 years ago #

    Hi I hope somebody can help,

    I have a theme for 2.5.1 and everything's working great. I don't want the Page Title to appear on my set homepage. A simple If statement doesn't seem to be working. The code that outputs the title is below:

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

    I've tried putting if(the_title() == "Home") {//do nothing} else {//display title}

    Can anybody assist? Thanks in advance!

  2. Anonymous
    Unregistered
    Posted 6 years ago #

    any help would be so much appreciated!

  3. a96camaro
    Member
    Posted 5 years ago #

    Try this:

    <?php if (is_front_page() ) { /*Do nothing*/ } else { the_title(); }

  4. aptdesignonline
    Member
    Posted 5 years ago #

    Thanks a96, that works great for me!

Topic Closed

This topic has been closed to new replies.

About this Topic