I’m afraid you have to do this manually. You can put someting like this in your single-vehicles.php
file:
if ( ... ) { // check if it's in used category/term
get_template_part('part-single-vehicles-used');
} else {
get_template_part('part-single-vehicles-new');
}
And then put new car template into part-single-vehicles-new.php
file and used car template into part-single-vehicles-used.php
.
Related Posts:
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- WordPress Doesn’t Generate Taxonomy Archive
- Taxonomy template file not working with a taxonomy that contains a slash
- Single taxonomy for different custom post types
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Organising custom taxonomies and custom post types
- Custom taxonomy returns 404
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- Filter widget outputs
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- Multiple pages for posts?
- Adding Page Templates to post but it ignored it
- Display latest x posts from all categories in Custom Post Type/Taxonomy
- Template for all categories of a custom post type?
- How to get list of taxonomy slugs ordered parents>childs?
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- How do I share categories across multiple post types?
- Migrating a taxonomy’s tags to the native category
- How to organize hierarchical structure in custom post type with taxonomy (like with categories)
- Multiple tag cloud filtering
- Flush Rewrite Rules when new site is created on network
- 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
- How to organise this data within WordPress
- WordPress custom taxonomy template not working
- Organize WordPress site, so it can maintain with huge database
- Review site custom post type structure
- How can I get this request to use the Custom Post Type page template instead?
- Filter get_cat_id for Custom Post Type
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link
- How to specify a template for a path like http://example.com/something?
- Custom Post type category pages template and loop
- Custom templates for a specific category
- Archive for a Taxonomy of a Custom Post type
- Output terms for custom post types
- Linking from CPT page to taxonomy.php
- Page not found for custom post type UI plugin and taxonomy
- Custom post type pages return 404 page?
- Unable to link categories to custom post type using standard function
- How to Set Taxonomy Object Description?
- Categories and tags for custom post types
- WordPress 3.9 not using custom template
- Template files for Custom Post Type and Taxonomy
- Set templates for custom post types
- How to Create Template File for Parent Page of Custom Post Type
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Custom post_type search pages
- Enable taxonomies by post type in an array of CPTs
- How to assign tag to custom post type in wordpress?
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Rename a slug label
- how to remove pages loading with the archive templates
- Custom Taxonomy Category link
- Main query not querying any posts in custom taxonomy template
- Custom Empty Results page for my Custom Post Type
- Get Post Terms of Current Post (selected taxonomy term) – How to get only the taxonomy value and not “Array ( [0] => taxonomy term )” in the frontend?
- How to get all Custom Post Type Filtered by one Specific Taxonomy Term
- Custom posts template page
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- How does the ‘the_post_navigation()’ work for CPT’s?
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- How can I use archive-{post_type}.php theme template?
- Custom post type – list posts based on meta_key and display them divided by CPT taxonomy category
- Custom taxonomy (categories) on custom post type return no results
- Filter second dropdown (tax) based on first dropdown (cpt)
- Variable not working in WP_Query
- Hide meta box for everything BUT a certain custom post type
- Archive-posttype.php isn’t loaded
- get_category_link() for custom post type does not include custom slug rewrite?
- make permalink go to a custom single.php file
- Add tags to custom post type without menu link
- Add Previous/Next Buttons to CPT Single Pages Only
- Targeting categories in custom fields
- Creating Sections for Post Types
- Custom post types with categories in template
- How can I create an automatic drop down menu with my tags?
- Associate all Custom Post Types with Taxonomy
- How to define a term for custom taxonomy
- Invalid Taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Need help deciding on a taxonomy
- Alphabetically sort a taxonomy.php template by post title
- Creating separate feeds for custom post types
- Which file/template is in charge of taxonomies for custom post types?
- Custom Post Types not queried in Custom Taxonomy archives or Native archives
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- How can I trace inconsistency in loading a template?
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- Get Posts by Category, Tag , and CPT Taxonomy
- Show Taxonomies with admin area for custom post type?
- How to get_term_meta on single custom post?
- Custom taxonomy template list not working (404)
- Pagination hitting 404 page on /page/4
- Remove categories taxonomy from custom post type