Since WordPress version 4.7 Post-Type-Templates are enabled in the WordPress core.
That means that you can create multiple templates for the single post-type view as for pages.
For this you just need to edit the single post/type template, and add something like this to the top of the file:
/*
Template Name: Custom Type Template
Template Post Type: post, product, custom-type
*/
On the line Template Post Type you just add your custom post type slug.
So this template will be available on the post, product and custom-type post type.
I already answered this here.
Read more about post-type-templates of WP 4.7 here.
Related Posts:
- What is singular.php?
- What are the differences between custom post type and custom page templates?
- Page Template as Custom Post Type Archive
- Loading custom page template via plugin
- Ordering Posts List By Taxonomy Terms?
- WordPress keeps fetching the archive page instead of the template page
- How to add custom template in plugin?
- How to quickly switch custom post type singular template?
- How to use a dedicated template for the Custom Post Type from a plugin?
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- Custom post type archive and single.php files not working
- Page Templates – this code only works for one Custom Post Type
- WordPress custom post type Single.php?
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Custom Post Type slug same as page name causing a conflict
- Control Custom Post Type template from a plugin
- Detect if 1st, 2nd or 3rd level custom page?
- Create second custom 404 page for selected post type
- is_page_template not working as expected
- Multiple portfolios with one custom post type?
- Hyphens instead of Underscores in Post-type Archive Template Filenames when Post-type handle contains underscore
- Including Custom Post Type posts in a page template contextually (or should I widget?)
- Can I make WordPress use a custom template for a child page
- Create Template for Custom Post Type same like for Page
- How to load a template without it being assigned to a page/post?
- Custom template with CPT doesn’t display on frontend
- create a template page for a post
- Custom post type archive page template
- Custom Post Type with Templates using Meta Boxes?
- Posts are duplicating on wp_post_update
- Custom-Posttype & Custom Taxonomy WP_Query
- Page template with different page and post content
- Custom page sidebar using Template dropdown box
- Adding sidebar to template creates horizontal gap the size of the side bar
- How to render a custom post type template with custom fields using shortcode
- Custom Post Type Template Alternative
- General advice on addressing content-centric pages
- next_/previous_post_link() `in_same_category` appears to fail when true
- Multiple templates for single custom post type
- How do you create a custom template to display a category with an image and related posts below?
- WordPress Custom Search by post_type
- Pages Become “Archive” Instead of Using Page Template
- Custom post type pages return 404 page?
- Multiple single templates?
- Custom URL redirect in WP
- Associate page w/ specific single post template?
- Include php on a specific page template
- page template for custom post type
- Page Template Dropdown For Custom Post Types
- How to integrate single and archive templates for custom post type in any WordPress theme
- providing access to post_id or post inside functions.php
- wp_get_canonical_url showing first url of the post for custom page
- Custom page for editing custom post type on frontend based on url
- How do I display child post types in the parent post type template
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Custom permalink structure for remote content pages
- Mixing Custom Post Types and Page Templates in WordPress 3.7.1
- Custom Post Type Template Insert not working properply
- Loop and add Specific Categories and Products Images
- custom post template ignored after altering permalinks
- Custom Post Type page template doesn’t show up
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- Display ONE taxonomy and its assigned pages
- Problem with custom loop navigation inside the blog page
- WordPress giving me the index
- How to use pre_get_posts on archive page custom post type
- Can I automatically assign a page template to a custom post type (i.e page-slug.php file)
- Virtual page and loading template
- Custom Post type dont use custom page template (slug is not right)
- How to change Elementor Template for Single Page Post on Load
- A certain theme is forcing it’s singular post layout
- How to create additional rendering for custom post types?
- Set a template on a custom post in the plugin
- How can I use a custom template to load custom post type posts based on a post_meta value
- Showing Custom Post Type with his templates on a custom page template
- Displaying posts inside table having issues
- Question on templates
- Custom post type option page template
- Custom post Query and WordPress Post Query Clash
- How can I load Template file from wordpress plugin
- How can I find out what template is my custom post type using?
- Search custom post type result in same template page
- WordPress custom post type and page
- Ordering Posts List By Taxonomy Terms?
- Loading a template for a URL pattern
- Custom Homepage As Single Page or Custom Post Type?
- Templates list in “Page Attributes” metabox is inaccurate
- Nested custom post types templating
- Custom Post Type & Page Template
- Multiple search template with separate stylesheets
- Using custom post types within a section of a template
- How do I paginate a custom post type listing on a custom template page?
- Custom Post Type order Title ASC
- get tags from custom post type
- Custom Post Type Template Based on Page Slug?
- using a template for more then 1 page
- display related posts based on the PAGE TITLE
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs
- Multiple search forms and respective results page templates?