Im looking for advice to generate a few 'default' post templates. Currently this is the setup for the CPT 'projects'.

We generate subpages and select the main post type as parent. This works well to generate the needed hierarchy.

The children of the parent post category will have 5 default templates that are different.

What's the best way to create a 'template' selector for those sub pages?

Thanks a lot.


  • sorry, i don't get, what you are looking for, can you please clarify? you want to have a select option inside your cpt to select the template, that will be shown?
    – honk31
    Oct 18, 2018 at 14:28

1 Answer 1


For an easy solution, you could just create page templates and set their Template Post Type to match your custom post type. WordPress has supported custom page templates for other post types than page too since version 4.7.

You can read more about it from the Theme handbook // Creating page templates for specific post types

This way you could use the native template selector that you can already see on a page's edit screen on the Page Attributes metabox.

Would this be a viable solution for you?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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