enter image description hereI'm trying to set a template to our blog page which is set as Posts page in WP Admin. The theme is Twenty Fifteen. The issue is that the option Template selector which appears for all other pages under Page attribute menu doesn't appear only on pages set as Posts page. Is this an error tied to this version or theme? There are multiple templates used in this website, but none seems to appear for this page.

  • how are you trying to set up the template? Aug 29, 2018 at 12:15
  • Template file was created as php files and its already applied to other pages, here's the image of my page settings i.stack.imgur.com/lC0Pg.png Aug 29, 2018 at 12:17

2 Answers 2


You cannot set a custom template for the latest posts page. This setting is ignored for it. The template that is used for this page is determined by the Template Hierarchy.

WordPress template hierarchy

So if you start at the left for Blog Posts Index Page you'll see that it uses home.php for its template, if it exists, otherwise it uses index.php.

But if your homepage is set to show the latest posts then front-page.php will be used if that exists.

PS: You're running a 2 year old version of WordPress, and should update as soon as possible.

  • The Front page displays a static page: Home and posts page is set as Blog, so as you suggested I shall edit home.php or index.php and update. And Yes, the version is too old, its office work and can't risk breaking any existing fx by updating. Aug 29, 2018 at 12:25
  • You're risking far worse by not updating. You're 11 security patches behind. At least update to the latest minor release, which is 4.6.12. Aug 29, 2018 at 12:27
  • you're right index.php is acting as template for posts page. Thank you. Aug 29, 2018 at 12:29
  • 1
    Keep in mind, looking at that chart, that index.php could be being used for lots of other types of pages too. So if you want to only change the Posts page, copy index.php to home.php and make the changes there. Aug 29, 2018 at 12:41

If you want to use template file, you need to write functions.php.

Hook is theme_page_templates.
like this

 * @param array $post_templates Array of page templates. Keys are filenames, values are translated names.
 * @return array Filtered array of page templates.
function makewp_exclude_page_templates($post_templates)
  if (version_compare($GLOBALS['wp_version'], '4.7', '<')) {
  return $post_templates['page-templates/blog.php'];

add_filter('theme_page_templates', 'makewp_exclude_page_templates');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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