How can i exclude the subcats of subcat of cat from here:
-
<?php if ( is_category() ) { $this_cat = get_category($cat); $sub_cats = get_categories('child_of='.$this_cat->term_id.'&hide_empty=true&exclude='); if ( !empty( $sub_cats ) ) { foreach( $sub_cats as $sub ){ $link = get_category_link( $sub->term_id ); $link_title = $sub->name; echo '<div class="post">'; echo '<h2><a href="'.$link.'" rel="bookmark" title="'.$link_title.'">'.$link_title.'</a></h2>'; echo $sub->description; echo '</div>'; } } } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How can i exclude the subcats of subcat of cat from here:’ is closed to new replies.