Hello all
I have a large site with nuerous categories and multiple templates. In my single.php file I have a lot of IFs and ELSEIFs which check for categories.
<?php if ( in_category('X') ) {
include(TEMPLATEPATH . '/this_template.php');
} else {
include(TEMPLATEPATH . '/a_different_template.php');
} ?>
This has worked fine to a degree. However I want to be able to make all posts that are in the child category of X call a specific template file. So using the above example, if a post was in category Y that was a child of category X I would still want it to include the this_template.php file.
I hope this is achievable - any help much appreciated.
Cheers
Matt