function myTemplateSelect()
{
if (is_category()) {
if (is_category(get_cat_id(‘brands’)) || cat_is_ancestor_of(get_cat_id(‘brands’), get_query_var(‘cat’))) {
load_template(TEMPLATEPATH . ‘/category-brands.php’);
exit;
}
}
}
add_action(‘template_redirect’, ‘myTemplateSelect’);

Advertisements