WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My main problem is around the title. In my index.php, I have specified a title tag and inserted the following:

<?php wp_title(); ?> | <?php bloginfo( 'name' ); ?>

My problem is the it is only printing the blog "name" - wp_title() prints nothing

i.e. This is what is being printed from the above:

| Wordpress Test Site

NOTE: The Page Title should be: Home

Strangely, when I visit My Sample Page, it presents the following:

» Sample Page | Wordpress Test Site

And they are both using the same header.php file!

Am I missing a setup somewhere that doesn't work on the home page?

FYI - I've set the Page - Home as the static front page.


share|improve this question
up vote 3 down vote accepted

The title is empty at the front page in WordPress. Yes, that sucks.
Just put the separator into wp_title():

//        separator, print immediately, separator position
wp_title( '·',       TRUE,              'right' );
bloginfo( 'name' );

This prints out just the blog name on the front page and PAGE NAME · BLOG NAME on other pages.

share|improve this answer
thanks - I also looked into the function is_home() to print a static title – php-b-grader Feb 27 '12 at 21:19
is_home() fails sometimes on multisite installs. Not reliable. :( – toscho Feb 27 '12 at 21:27
actually, is_home() doesn't work - is_front_page() is the ticket! – php-b-grader Feb 27 '12 at 21:29
Same problem on multisite. For a breadcrumb plugin I wrote recently I had to hack around this bug. – toscho Feb 27 '12 at 21:31
thanks for feedback - this is a single basic site so should be ok – php-b-grader Feb 27 '12 at 22:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.