You can load a different template for single posts via the single_template filter. Just use the has_term() function to check if the post has a specific term in your custom taxonomy.
function wpa_107626_single_template( $single_template ) {
// check if the post fits some condition
if ( has_term( 'term1', 'film_cat' ) ) {
$single_template = get_stylesheet_directory() . '/single-term1.php';
}
return $single_template;
}
add_filter( 'single_template', 'wpa_107626_single_template' ) ;
Related Posts:
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- Assign posts to taxonomy terms instead of the taxonomy terms to posts?
- Exclude from search all custom posts which are NOT in a taxonomy term
- Custom SQL Query on Custom Post Type. Order by Taxonomy?
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- Paginated Taxonomy Term Archive including one post per term
- $wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
- Get posts by querying taxonomy and certain terms of the taxonomy?
- Custom post type templating problem
- Custom Post Type Taxonomy Filters
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- How to conditionally redirect to the post from a taxonomy page?
- How to group posts and get a mixed posts and groups view?
- How to list tags from custom post type attachments?
- How to get_term_meta on single custom post?
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Custom Post type Query by Taxonomy
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- ACF – Retrieve custom taxonomy from a relationship field
- Display Custom Field or Custom Taxonomy in front page /post/product
- WP_Query not using custom taxonomy categories on custom post type
- Showing taxonomies with terms that are attached to custom post
- Getting all custom post taxonomies and exhibiting only part of them
- Error get_posts with Custom Taxonomy and OR relation
- Get list of CPT posts in *current* post’s taxonomy term
- tax_query showing no results
- Linking custom taxonomies and posts
- Storing/querying custom date data
- Advanced search form with filters for custom taxonomies and custom fields
- Show Custom Taxonomy Inside Custom Menu
- Check if a custom taxonomy archive page is being displayed
- How to limit the number of terms (terms acts like categories)
- Why does a custom post type need the ”hierarchical’ args setting?
- Permalink rewrite with custom post type and custom taxonomy
- Semantic URL Custom Post Type and Taxonomies permalinks
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Custom Post Types – Titles as Taxonomies
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Using pre_get_posts to Filter Posts
- Query for custom post type objects in a taxonomy and with a meta value
- Get post type from taxonomy or category page
- get_categories() for only CPT
- Custom Post Custom Taxonomy Data Not Saving in Edit Screen
- CPT Search Form with Taxonomy filter & Or
- Custom Post Type – Display Categories & Tags In Dashboard list
- Weird problem happening with custom taxonmy when creating/updating posts
- Display CPT posts based on specific taxonomy
- Why get_posts() not returning only selected category posts from Custom Post Type?
- How to use custom taxonomies to reference complex relationships?
- Taxonomy custom post type URL
- How do I display the taxonomy for a custom post type in an array
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- How to edit this code to get the categories in achieve page?
- Get general taxonomy name for a Custom Post Type
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- List Taxonomy Terms based on another Taxonomy
- Best way to organize book-page structure
- Get url.com/post_type/taxonomy/term work!
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- How do I add a Custom Post Type that looks and behaves exactly the same as Posts?
- Template files for Custom Post Type and Taxonomy
- Custom Post type & Taxonomy 404
- WordPress menu with custom taxonomy
- attach CPT data to a taxonomy
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- Creating a non-hierarchical Taxonomy that behaves like categories
- Custom Post Type not showing in main loop
- How to get xml file for a single post type?
- How to change single custom post template by custom taxonomy?
- How to query Posts from a custom post type which contains a custom taxonomy?
- Most viewed post of custom post type
- Sorting the Loop by Taxonomy Value
- Custom post type page with parameter
- Custom taxonomy, post type, and URL permalink structure
- Getting Same Description in All the Custom Taxonomy Posts
- Order custom post type by taxonomy
- Check that a slug is present in the get_terms request
- I have a random letter appearing before my content. Where to start looking for the cause?
- Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1
- Taxonomie cpt with acf
- How to display custom post type pagination buttons when processing AJAX request
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- How to manage a dynamic multi-level page hierearchy system?
- How to Fix WordPress 500 Internal server error due to custom post type
- Pagination fault in custom post type archive page [duplicate]
- Connecting multiple post types? Or linking “News” posts with “Game” posts how?
- Querying multiple taxonomies in URL leads to wrong taxonomy archive
- Sort by Custom Post Type (Multiple Loop)
- Costum post type with costum (sub)taxonomy
- Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks
- WordPress Custom Permalink Structure with Custom Post Type and Taxonomies
- Custom taxonomy archive page not routing?
- get_the_term_list() wanting to loop through the returned values
- Display tags & categories seperatly
- Two Permalinks with one Taxonomy (custom taxonomy) and (custom post type -> custom taxonomy)
- Custom Post Types Do Not work on this permalink setting https://somedominaname.com/%category%/%postname%/
- How to get custom taxonomy from Custom Post Type to display in Post Block in Unlimited Elements
- Can’t retrieve custom post type taxonomy term to custom post type editor