0
votes

I'm using different page-templates this for pages.

Now I need the same for posts.

Since 4.7 this should be a core functionality.

So I pretty much followed this quick tutorial and added a custom single-duplicate.php in my theme folder and added this code at the top:

<?php
/*
Template Name: Full-width layout
Template Post Type: post, page, product
*/

However upon creating a new post I dont see the "Post Attributes" Box with the Template-dropdown. What do I do now? Is it possible that my theme somehow prevents that?

Here's my themes functions.php as a gist, if that helps.

1

1 Answers

0
votes

I think you are a bit confused as to what Page Attributes will give you access to. To the best of my knowledge, you do not get a drop down to choose a template (as you do on Pages) as an automatic function on posts/custom post types.

you need to create a single-{POSTTYPE}.php in your theme directory and need to add/follow the HTML structure of your page template.

For more information,

Hope this will helps you.