You can use has_term()
to check if a post is in a specific term.
if ( has_term( 'reel', 'filter', $post->ID ) ) {
get_template_part( 'loop', 'work_feed_reel' );
} else {
get_template_part( 'loop', 'work_feed' );
}
Related Posts:
- How to get all taxonomies of a post type?
- Saving Taxonomy Terms
- Get Posts by Custom Post Type ,Taxonomy, and Term
- How do I append multiple taxonomies to the URL?
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to limit the number of terms (terms acts like categories)
- How can I list all the categories under a Custom Post Type (taxonomy)?
- How do I list custom taxonomy terms without the links?
- How to list custom taxonomy categories?
- Custom Taxonomy Template Post List with Sort Order
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Taxonomy archives based on Custom Post Type
- array_pop() expects array, boolean given for $event_type_term ->slug
- Get the ‘slug’ of a custom taxonomy
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- How to get the parent’s taxonomy?
- Include custom post type in “all posts”
- wp_insert_post custom taxonomy
- Display taxonomy term only if there’s a value
- Get all taxonomies for all post types
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Taxonomy Templates
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- Problem with custom post types, taxonomy and permalinks
- How to create new category for custom post type?
- Fetch taxonomies by custom post type id array
- get_terms showing all categories instead of the ones assigned to a specific post
- Query Multiple Taxominies Across Multiple Post type’s
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- Custom Post Type Taxonomy Filters
- Categories of custom taxonomy don’t show any posts
- Custom Taxonomy back-end customizations
- Taxonomy custom post type URL
- Is it possible to have dedicated page for parent/child taxonomy?
- Get related posts of child term of custom post type
- Display a grid of taxonomy terms at root taxonomy page
- limit value taxonomy based on previous taxonomy value wordpress
- How do I display the taxonomy for a custom post type in an array
- How to conditionally redirect to the post from a taxonomy page?
- Suggested Post and Taxonomy structure
- Display post content with respect to its title?
- How to make custom taxonomy into drop down select in a custom metabox
- How to get list of taxonomy slugs ordered parents>childs?
- How do I share categories across multiple post types?
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy in URL
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- How to Set Taxonomy Object Description?
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Variable not working in WP_Query
- Hide meta box for everything BUT a certain custom post type
- How can I create an automatic drop down menu with my tags?
- How to define a term for custom taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Alphabetically sort a taxonomy.php template by post title
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- Show Taxonomies with admin area for custom post type?
- Custom taxonomy template list not working (404)
- Use the custom post type archive for taxonomies?
- Query custom post types & Taxonomies and list them in a table on a page
- Taxonomy template page not working
- Creating custom post type posts and associating them with a post from another custom post type
- Copy/Move selected taxonomy terms to another taxonomy for posts
- Get posts by category name
- Custom Post taxonomy template
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Query Custom Post Type by Taxonomy
- Filter taxonomy by CPT
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Define multiple prefixes for custom post type
- How to order taxonomy terms by most recent post?
- Taxonomies are not showing in the category dropdown
- Change custom post taxonomy values from front-end
- Display 3 level taxonomies
- List posts that have the current url taxonomy
- List all posts associated under custom taxonomy
- How to transfer categories (default) to custom taxonomy?
- Custom Taxonomy – fields
- Pages of my taxonomy terms are showing all posts
- Custom post type category link + add to menu
- How to get all posts assigned to a taxonomy term only?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- How to show post which has the specific taxonomy terms?
- WordPress add taxonomies/terms list as a menu in archive page
- How to create TEMPLATES for TAXONOMIES? What I have to change in this code?
- Displaying taxonomy icon outside archive page
- Custom post type post taxonomies
- Show taxonomies from specific CPT
- insert a taxonomy for a custom post type
- See the process of creating a taxonomy and tell me where I made a mistake
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- Show custom category archive as front page and remove taxonomy slug from urls