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?
Related Posts:
- single-{$post_type}-{slug}.php for custom post types
- Template for specific post of custom post type
- Multiple Single Post templates
- Custom Post Type with Nested Taxonomy and Template Files
- Single page template for custom post_type
- Trying to manage templates on a blog with lots of custom taxonomies
- WordPress Template Hierarchy
- Include custom post type single template, but respect theme override of template if it exists
- WordPress Doesn’t Generate Taxonomy Archive
- Custom Empty Results page for my Custom Post Type
- Templates for hierarchical custom post type
- Custom Post Type homepage template
- taxonomy – templates are not loading
- Templates for CPT not working
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- Single taxonomy for different custom post types
- Custom Homepage As Single Page or Custom Post Type?
- Can I assign a template to a custom post type?
- Get custom post_type’s archive URL
- What is singular.php?
- Custom Post Type Plugin: Where Do I Put The Template?
- Searching multiple custom post types and pages
- display different template based on post type
- CPT Template Not Showing – Getting 404
- Taxonomy, Terms, and Template Files
- previous_post_link() and next_post_link() with a custom post type?
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- tag.php doesn’t work with tags on a custom post type post?
- Setting a custom sub-path for blog without using pages?
- Custom Post Types 404 Issue
- How to add custom content template part for a custom post type on main query using a plugin
- Assign single template to multiple custom post types?
- Add Content to Page without shortcodes
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- Loading custom page template via plugin
- How to set a fall back template for a custom post type in a plugin?
- Templates for Custom Post Types and Custom Taxonomies
- Using Templates with Custom Post Type UI
- Get page by template?
- Display Editable Text Above CPT Archive Listings
- Custom taxonomy query for a custom post type
- Apply template to custom post type
- Page is defaulting to archive page and not designated template
- How to quickly switch custom post type singular template?
- How to list/show all custom post types regardless of category?
- Custom Post Type Archive URL takes over page URL
- Need some templating advice for templating with custom post types and taxonomies
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- How to query custom posts using a dynamic category
- Using Custom Templates for Custom Post Types for the Genesis Theme Framework?
- Custom Post Type Archive Template
- Custom templates for posts like for pages: page-{id} vs single-{id}
- Posts in Multiple Columns and Rows with one single loop
- Create Pages from Database
- Custom page type – template under page attributes?
- Template tags to display custom post type posts in category template?
- How do I create new content pages for my Custom Post Type?
- Display different gutenberg template from selected post attributes
- Clean URL permalink for custom post type
- custom post type archive template per custom taxonomy term
- where can I see my custom post type archive template?
- Custom post type loops with different page templates
- Display posts of child category in template
- custom taxonomy – Template not working
- Archive or taxonomy pages not working for custom post type
- Include different loop templates in search query
- Create separate template for shared custom taxonomy with shared terms
- Custom Post Type Templates?
- Turn query string to sub page
- Remove header and footer but KEEP all css and js etc for a custom post template?
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- wordpress 3.4 template files in subdirectories
- Pagination Issue: Custom Post Type In Index
- Lock post meta block at the bottom of a custom post type
- Create second custom 404 page for selected post type
- How do I provide a “show all posts” link in a paginated term archive?
- Rewrite Custom Post Type URL slug
- is_page_template not working as expected
- I am trying to output portfolio items with a picture. This code doesn’t seem to be working. What am I doing wrong?
- Custom post type and taxonomy permalinks – Structure
- Help with CPT template pagination
- How can I force custom post type to use a specific template?
- Multiple templates for a custom post type
- Help splitting a custom post type archive into “past” and “upcoming”
- Merge multiple custom post types in a single archive template
- Rewrite URL for only archive page (custom post type)
- Trying to edit the single page from a Custom Post
- Custom Taxonomy term archive template
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- How to show the archive / post type description on Single templates
- Plugin templates in which directory
- Create Template for Custom Post Type same like for Page
- WordPress Ignoring My Custom Post Type Templates?
- Custom post type not using it’s own single-postname.php
- Using wordpress template tags within an array
- Hook to override title, image and content
- Custom template page with custom archives listing by user
- Custom post type not using custom template
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown