[Solved] Page attribute template dropdown not displayed even the syntax is correct

If you’re wanting to enable the Page Template dropdown for a custom post type, you have to enable support for “page attributes” when you define your CPT. You should currently have something like register_post_type(‘foo’, array(‘labels’ => array( … ), ); You need to add ‘supports’: register_post_type(‘foo’, array(‘labels’ => array( … ), ‘supports’ => array(‘title’, ‘editor’, … Read more

[Solved] Custom page template

Your code will only display a list of your posts if the page that is using that template is set to be the Posts Page (in admin settings). If you want any other page to display a list of posts, then you need to write a custom query inside the template. E.g. using WP_Query: $args … Read more