Forums

Problem in display of page title (2 posts)

  1. drtanz
    Member
    Posted 2 years ago #

    I am using the following code to display the word Home if its the home page, else the page title for other pages, in my website. However on the home page I dont get the word 'Home' output, just blank space and the bloginfo('name') details, what is the problem? Thanks

    BDW I have created a page named Home and set wordpress settings to point to this 'Home' page as the homepage of my site.

    <title>
    <?php if (is_home()) { echo 'Home'; /*bloginfo('description');*/ ?>
    &mdash;
    <?php } else { wp_title('',true); ?>
    &mdash;
    <?php } ?>
    <?php bloginfo('name'); ?>
    </title>
  2. vtxyzzy
    Member
    Posted 2 years ago #

    Try changing is_home() to is_front_page().

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.