Display subcategories from a category
↳ Added by admin → August 10, 2010 in WordPress. ⌈no comments⌋You need to use get_categories to display sub-categories of a particular category so they can be displayed in a different template.
$cats = get_categories('child_of=1');
foreach ($cats as $cat){
$cats_array[] = $cat->cat_ID;
}
if ( is_category($cats_array) ) {
//do stuff
}