Default Posts Page Template Change in WordPress 3.8.1
Posted on January 30th, 2014
A bit of strange behaviour here, that I cannot see documented in the changelist for WordPress 3.8.1.
One of my WordPress 3.8.0 sites auto-updated to 3.8.1 on 24/01/2014. The theme was using a static page for displaying the posts, which had happily been using the ‘page.php’ template file from the theme.
However since the update the posts page stopped using the ‘page.php’ template and now uses ‘index.php’.
Problem was, my theme didn’t have an ‘index.php’ page.
…Yeah yeah, I guess it should have (being the default fall-back in the themplate hierarchy), but before the update all pages/posts had got by fine without it – relying on the more relevent ‘page.php’ file as indicated in their explanation of preference:
Template file used to render a static page (page post-type)
-
- custom template file – The Page Template assigned to the Page. See get_page_templates().
- page-{slug}.php – If the page slug is recent-news, WordPress will look to use page-recent-news.php
- page-{id}.php – If the page ID is 6, WordPress will look to use page-6.php
- page.php
- index.php
I can only surmise that from WordPress 3.8.1 the static page used for posts, no longer defines it as a ‘page’ but sees it as something else (not sure what yet?…), defaulting to the catch-all ‘index.php’ template file.