I am thinking you probably want get_template_part()
to load CPT specific pieces of code. For example (from the Codex):
get_template_part( 'nav', 'single' ); // Navigation bar to use in single pages (nav-single.php)
You can then reuse pieces of code on your home page, your CPT archives, etc.
You may also find post formats useful, though I am still unclear about exactly what you want to accomplish.
Take a look at the way Twenty Thirteen (for example), handles posts formats by using content-aside.php
, content-audio.php
, etc
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
- Templating advice sub posts of a CTP
- 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?
- display different template based on post type
- 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
- Setting a custom sub-path for blog without using pages?
- How to add custom content template part for a custom post type on main query using a plugin
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- How to set a fall back template for a custom post type in a plugin?
- How to quickly switch custom post type singular template?
- How to list/show all custom post types regardless of category?
- How to query custom posts using a dynamic category
- Using Custom Templates for Custom Post Types for the Genesis Theme Framework?
- Create Pages from Database
- Custom post type loops with different page templates
- Include different loop templates in search query
- Turn query string to sub page
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Multiple templates for a custom post type
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- How to show the archive / post type description on Single templates
- Custom post type not using it’s own single-postname.php
- Set up Custom-Post-Type Author Archive
- Custom post type templating problem
- Query with no terms uses index.php template instead of archive.php
- WordPress Custom Post Type Children Template
- Getting template_include to work when allow_url_include is off?
- Custom post type showing index.php
- redirect automatic page that serves custom posttype content
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- CPT Template Not Showing – Getting 404
- WordPress custom taxonomy template not working
- How to specify a template for a path like http://example.com/something?
- Custom templates for a specific category
- WordPress 3.9 not using custom template
- How to Create Template File for Parent Page of Custom Post Type
- Custom post_type search pages
- how to remove pages loading with the archive templates
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- Custom post types with categories in template
- Creating separate feeds for custom post types
- How can I trace inconsistency in loading a template?
- How to get_term_meta on single custom post?
- Assigning alternate single-{cpt} template based on blog_id in multisite
- Custom Post Type Template Hierarchy – Single post template
- How do I find a way to create a global single.php for a custom post type?
- How to use single.php for creating, reading and editing Custom Posts with ACF
- assign different templates to custom post type with homepage loop
- Assign a template to a custom post type when displayed by the main loop on the home page
- Custom permalink structure for remote content pages
- Custom post type draft use wrong template
- How can I add in post’s the text “No content”
- How to customize `Edit-Post` Screen
- Calling a div and content in php?
- Tag template not returning posts [closed]
- Specifying a template for custom post type pages
- Custom post type set default template using block editor
- Archive page of taxonomy returns a 404 error
- A certain theme is forcing it’s singular post layout
- Post template not applying on theme (potentially rendering as Page template)
- Custom post type defaults to index.php for archive page
- Custom Post Taxonomy Template Not Loading Properly
- Is it possible to link an external stylesheet, exclusively within a specific single post template?
- Question on templates
- Assign for all post of a post type a specific single-post template
- Specific template for subcategory of custom taxomy
- Custom post type option page template
- How can I load Template file from wordpress plugin
- How to override post-new.php with custom template
- How can I find out what template is my custom post type using?
- Can I organise my custom post types by page?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Different taxonomy.php for different custom post types
- Redirect to different template other than single-custompost.php
- WordPress Custom taxonomy template
- custom post type plugin – single template
- Use one template for different custom post types with the same markup
- URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php
- How can I pull information from my loop and divide them seperately?
- Storing postID in session variable to query database when visitor on custom template page
- How to make a template for a specific post of a custom post type?
- WP_Query is getting the post but the_post() not rendering any Post
- Apply text based styling done for a single post in WPBakery to all posts / create a template out of it [closed]
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Why isn’t page attributes dropdown not showing up in a custom post type