0

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? – Castiblanco Aug 29 '18 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 – Sandeep C. Nath Aug 29 '18 at 12:17
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. – Sandeep C. Nath Aug 29 '18 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. – Jacob Peattie Aug 29 '18 at 12:27
  • you're right index.php is acting as template for posts page. Thank you. – Sandeep C. Nath Aug 29 '18 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. – Jacob Peattie Aug 29 '18 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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