Hello on my wordpress site I have a custom template for category A with slug (cat-a). I created a category-cat-a.php file to give this category a custom layout and this works without a problem.
I am wondering is there any easy way to apply this same layout to all subcategories of A (I don’t really want to have to create a custom template for every subcategory asthere is a lot)?
If
a
is the category slug, then following code would work –I dont know if it’s the best way but one possibility that comes to mind is to hook the template_redirect function.
If it where a custom post_type and I wanted children to a unique template I would do it like this. U need to tweek to work with taxonomys but the same principle apply.