Hook into template_include
filter
add_filter('template_include', 'research_term_template');
function research_term_template( $template ) {
if ( is_tax('classifications') ) {
$parent = get_term_by('slug', 'oldresearch', 'classifications');
// to improve performance you can hardcoding 'oldresearch' term id
// $parent = 12;
if ( term_is_ancestor_of( $parent, get_queried_object(), 'classifications' ) )
return get_template_directory() . '/taxonomy-Classifications-oldresearch.php';
}
return $template;
}
Related Posts:
- Can’t get a custom template taxonomy page to display
- Custom Taxonomy Archive Page
- Taxonomy Templates… by hierarchical level?
- How to display a listing template of a certain taxonomy?
- How to use wp_terms_checklist() on front end
- Custom taxonomies, with custom rewrites/slug, AND loading a taxonomy archive template from a plugin
- Custom Taxonomy Template not respecting ‘include_children’ => ‘false’
- How can I set up a category “overview” page?
- Which template name to use for taxonomies but not their terms?
- On Taxonomy Template page, want to add Post_Type
- Custom taxonomy template not working
- Using a different template per Custom Taxonomies for single term archive pages
- Woocommerce custom taxonomies page
- Generic taxonomy-term template page
- 404 for a custom taxonomy?
- Why is my taxonomy template not shown?
- Meta description – template code to get category description
- Create and set templates for custom taxonomies
- Pagination on custom taxonomy
- How to have two different versions of a tag/category/taxonomy archive page?
- How do I create a custom archive page depending on the custom taxonomy type?
- Different single page templates for taxonomies
- Override Taxonomy Template
- Taxonomy Parent Name
- Avoid taxonomy-%term%.php if more than one taxonomy
- Returning One custom taxonomy term name
- Make child taxonomy categories use a set template
- How can I make front page to display custom taxonomy page?
- Why get_page_template() doesn’t show taxonomy template file name?
- pagination not working on custom-taxonomy template
- How to add custom content to custom taxonomy
- how to access the $query variable inside taxonomy-xxx.php template file?
- Template file renders on local install, not on web
- Catch all taxonomy template
- Taxonomy archive uses incorrect template when query strings are used
- How to use custom slug and custom templates for custom taxonomy?
- How to get a terms and posts associated with another term?
- Custom taxonomy archive template not recognised
- Post not showing in my custom advanced search
- How to display custom taxonomy
- WordPress doesn’t respect the template hierarchy?
- How to update WordPress custom SQL Select query for custom taxonomies so that syntax is correct?
- Can you orderby slug in a taxonomy archive page using WP_Query?
- Custom Taxonomy Template Variables Available?
- is_tax not working for custom taxonomy
- Is there a way to ‘Lock’ a Taxonomy?
- get_query_var(‘paged’) always returns empty
- Return only the custom sub-term for custom post type, do not echo term-parent
- wp_insert_term is adding a term that has no name
- Connect Users and Taxonomies
- WordPress json api taxonomy index method
- Retrieving custom taxonomy in order, but excluding specific tax IDs
- Sort Custom Taxonomy Terms in admin by custom order
- Change in custom taxonomy permalink causes 404 error for another custom taxonomy
- Custom taxonomy parent from another taxonomy
- How to create drop down for child categories of current taxonomy being viewed?
- How to dynamically add custom taxonomy terms as a sub-menu of an existing menu item, using custom walker class
- Get terms ordered by post date
- Custom Taxonomy template not showing
- Custom Taxonomies Cababilities
- Get posts from taxonomy URL
- How to implement custom search with input fields?
- Custom taxonomy [year] is directing to yearly archive
- How to show the a custom taxonomy term on single post metadata
- Sort order by slug for looped child terms of custom taxonomy
- Simple Filter between multiple taxonomys
- put custom taxonomy slug in front of their respective term slugs
- Add success message to category add screen
- Prevent users from adding taxonomy terms
- Count Number of Posts in Taxonomy Term in Last 24 Hours
- Changing select options based on previous select with PHP & AJAX
- Headers already sent warning in Admin source is media.php 3140
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- How can I reduce amount of ifs and else ifs in this specific block of code?
- Get name of taxonomies of current page
- Geographic search with taxonomy structure [duplicate]
- SQL / wp_update_post: change post custom field to CPT post taxonomy
- Custom Permalink Structure for terms/taxonomies of custom post type
- register_taxonomy for both ‘Post’ & ‘Page’
- List one post only from each subcategory using get_posts?
- Search custom taxonomy via query-string?
- how do you pull data from two taxonomies?
- problem : Custom taxonomy template not showing
- WordPress not saving tags for custom taxonomy term description
- Display multiple taxonomies in a function
- WordPress search form and search result through ACF field in custom taxonomy
- Exporting Custom Taxonomy Description without Plugin
- How do I display post count of a custom post type with custom category taxonomy in wp_menu_nav?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- WordPress Main Menu with dynamic url
- wp_insert_post and custom taxonomy
- Dynamic value for get_option linked to taxonomy term_id?
- Best Method to Switch Between Terms (Custom Taxonomy)
- Getting the parent terms adds additional empty markup [closed]
- How to query authors by custom taxonomy?
- get multiple values from $_GET from multiple checkboxes
- Way to organize content – custom taxonomies or other way?
- Using post type archive page for taxonomy archive
- Custom Fields link to other pages, not search
- Taxonomy archive link from term id