I have about 100 blog posts and I’ve been successfully creating ‘Page Templates’ with ease – and when I create a page I can select the Page Template from the ‘Page Attributes’ which is all very nice and easy.

I thought the same would be possible for posts…

So I created a post template and saved it as ‘single-template-1.php’

Having uploaded the Post Template I notice that there ‘Post Attributes’ dropdown isn’t there so I cant select that template.

Any idea what I could do to fix that?

Thanks!

2 Answers
2

You have to add the following lines at the top of your post template file:

<?php
/*
 * Template Name: Featured Article
 * Template Post Type: post, page, product
 */

 get_header();  ?>

Of course replace “Featured Article” with your desired template name and the list of post types with the post types you want to use the template for.

Leave a Reply

Your email address will not be published. Required fields are marked *