WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 blog page is not my homepage. How can I add a title to the top of the page? i.e. "My Blog". Right now there is no title on the page. The title of the first post is at the top. (Sorry it's on my local machine or I'd provide a link and I'm too new to post an image.)

Things I've tried:

  • Creating a "blog" template page. It didn't work because the blog always uses index.php. (Thanks to Rev. Voodoo for the code that helps you see which template is used.)
  • There is a similar question on stackexchange but it's not really answered and I don't understand it.

Thank you!

share|improve this question
What do you mean by top of the page? you mean a browser title? or just on the page as text? -- also what theme are you using? quick answer for both. If you want some sort of static text to display. You can edit your theme's .php files. Like, index.php, page.php etc to be found in wp-content/themes/yourtheme/... If you have basic html knowledge that shouldn't be a problem to locate where. if it is the actual browser title look for the <title></title> tag, although you should be able to change that in your adminpages for most themes. Do give some more details on what exactly you are trying, or w – woony Jul 31 '12 at 11:32

the accepted answer in the similar question on stackexchange should work;

try to add this to a suitable location in index.php of your theme:

<?php if( is_home() && get_option( 'page_for_posts' ) ) echo get_the_title( get_option( 'page_for_posts' ) ); ?> 
share|improve this answer
This did not work for me. It returned empty field. Just FYI. – hanazair May 3 at 22:30
I found the answer here: wordpress.stackexchange.com/questions/48006/… – hanazair May 3 at 22:31

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.