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

Hay, I'm making a WordPress template, and i have 4 main pages.


As you can see "Blog" is a page (i need it to display when i call wp_list_pages()), but how do i edit this blog page? I assigned the "Blog" page a custom temeplate (called blog.php), but when "Blog" is set as the "Post page" in the Reading section of the WordPress admin, the page fails to render the template.

How do i edit this "Blog" page?

share|improve this question

migrated from stackoverflow.com Mar 29 '11 at 16:44

This question came from our site for professional and enthusiast programmers.

for wordpress.stackexchange.com ? – Trufa Mar 29 '11 at 15:41
Does it work as normal page? Btw: show us your code and tell us what exactly you tried so far. – kaiser Mar 29 '11 at 16:49
up vote 3 down vote accepted

Setting page to be "posts page" changes its template hierarchy to follow home page rules.

So your custom template is ignored and it looks for home.php or index.php, which might or might not be the reason it fails to render.

share|improve this answer
So home.php is the blog page, and index.php is the home page. Is this documented anywhere? – dotty Mar 30 '11 at 8:10
@dotty not quite, home.php is home page with list of latest posts and index.php is fallback template for everything that doesn't have more specific template. See Template Hierarchy in Codex. – Rarst Mar 30 '11 at 9:36

When you set a page to be the Posts Page, it will override any custom template or content you assign and automatically use index.php to render the posts loop.

share|improve this answer
Actually, at least if the site is set to use a static Page as the Front Page, then whatever static Page is assigned for the blog posts index will use home.php. – Chip Bennett Mar 29 '11 at 20:02

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.