I would recommend using the category_template
filter – just check if the current category is an ancestor of 67
:
function wpse_179617_category_template( $template ) {
if ( cat_is_ancestor_of( 67, get_queried_object_id() /* The current category ID */ ) )
$template = locate_template( 'category-slider.php' );
return $template;
}
add_filter( 'category_template', 'wpse_179617_category_template' );
Related Posts:
- Preventing index.php?category_name=something from redirecting
- Make all subcategories use the template of its category parent?
- Different templates for parent and children categories/taxonomies
- Display only deepest category on a single post?
- Exclude a category from the filed under list only on some templates
- Create single.php for specific category by category id
- is_archive() content being shown instead of is_category()
- How to override Category rendering mechanism
- How to control template resolution if both Author and Category filter in place?
- Which php file lists all the post of a category
- Apply custom category template to subcategories
- Custom page for WooCommerce’s /product-category/
- Code to pull in a PHP file named after the category ID
- Exclude category from Tag Template
- How to make a Thumbnails Mosaic
- Are Category or Tag Archive Pages Possible?
- Possible to make a subdirectory that loops through a single category?
- Need Category RSS Feed that shows all posts
- WooCommerce IF statements not working
- Set a them for all subset of category
- How to display only posts assigned to a particular, isolated, subcategory
- Highlight wp_nav_menu when category is selected
- Archive.php filtered by pre-determined category
- one category template for multiple categories
- Different templates for different category tags
- The default code for “posts_nav_link” on category.php isn’t working
- Only one post is showing on category page, why?
- Updating category template to change how subcategories display
- Categories overview that links to page displaying posts
- How can I get categories IDs if multiple categories requested via URI?
- Category template to show different categories based on parent
- Does “show_option_all” in wp_list_categories do anything?
- How can I improve this taxonomy treating approach?
- Sub category templates
- Custom taxonomy template for categories
- How to insert category list into post creation page, and retrieve chosen categories?
- Limit number of posts on a custom category template – breaking pagination
- How can I display the number of post associated to a category in Twig/Timber WordPress? [closed]
- Is it possible to have a template that works on multiple categories where the link address contains the specific category?
- Custom template for sub-sub-categories
- What Must to Display the “mysite.com/category” URL?
- How to use wp_list_categories with plugin category?
- Using if statement in index.php instead of creating separate template files
- Why is my sub-category template showing the wrong posts
- Template for product-category page [closed]
- Add Date & Author Meta to Category Archive Page
- Display subcategories selectbox on each category page
- Displaying year once in category.php [duplicate]
- Category link redirect to custom template page instead of index.php?
- I would like to feature a tip on the homepage
- How to differentiate the homepage structure from the category page structure in WordPress template?
- How can I include custom category and tag base in template files?
- Different header for each category
- Category Template – Show Last Entry as Featured
- Custom post type archive category page results in 404
- Include home page template in specific category template
- Output Title of Post’s Current Category
- Showing different posts on category pages
- Displaying categories in different template problem
- Include last post date in get_categories loop
- How to list posts from a sub-category that is listed in a parent category (more details below)?
- Custom Archive Template for Multiple Categories
- Category custom template is not showing correct posts
- Adding a category view to a page
- Using a template page parent breaks page
- the_content() not showing full posts in category template
- Use different file includes for single.php
- Display Taxonomies in loop with template args
- Choosing different templates for categories
- Show posts from all categories
- Getting page/category content to show up in my custom page template
- Most efficient way to have 1 template for parent, 1 template for child categories?
- Category Templates for Post Types not Working
- One category not displaying template updates
- WordPress a template for subcategories fo a given category, but not for root category
- How do I get a single page navigation depending on the previous page?
- Add 1 category more to If_in_category statement
- Custom Fields to Category edit page, then displaying them in a template correctly
- Template files not working for archives and categories
- Category Template – to be editable from the backend?
- 2 Categories using same template but one has a problem? [closed]
- have_posts is empty on category.php
- Why does my category page display “posted on…” when all I want it to do is display categories?
- How to create a template for categories
- How to load/include category templates based on conditionals?
- How to check if I’m on the last page of posts?
- How to list categories and subcategories in JSON format?
- Duplicate Category and Page URL loads Category instead of the Page
- Filter posts by categories ajax is showing nothing
- How can I add a class to displays a category?
- WP_Query – using category__and when one of the categories is 0
- Exclude categories from homepage not longer working
- Related posts widget – category
- Header Link function not working. Problem with bloginfo()
- WordPress category filters as subcategories
- Please tell how to stop the category from showing up on posts
- Next and previous links category infinite loop
- htaccess redirect for all categories converted to tags now showing 404
- Category page with gallery for each post
- How to define category ID in an array?