Using Post Type Templates

Hi I’m trying to make use of WP’s new Post Type Templates https://make.wordpress.org/core/2016/11/03/post-type-templates-in-4-7/

I’m using WP 4.8.x

I duplicated template-blank-1.php and renamed it to a name suiting the template name. I put it in x-child/views/renew and have the correct name in comments section of the .php file:

/*
Template Name: Full-width layout
Template Post Type: post, page, product
*/
But I’m not seeing this template in the post attributes.

Is this the correct place in x-theme.

Hello There,

Thanks for writing in! To resolve your issue, assuming you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

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

*/
?>


<?php x_get_view( x_get_stack(), 'template', 'blank-1' ); ?>

3] Save the file named as fullwidth-layout.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/

We would loved to know if this has work for you. Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.