<?php if (is_category( )) {

$cat = get_query_var('cat');

$thiscat = get_category ($cat);

$parent = $thiscat->parent;

if ($parent != '') {

wp_list_categories( array(

'child_of' => $parent

) );

}

else {

wp_list_categories( array(

'child_of' => $cat

) );

}

} ?>

Write A Comment