[Resolved] Listing Subcats on a Category Page
I am a php newbee. I am tring to get a list of Child Categories listed on a Category page. If I have a Category called ‘Books’ I want it to write the Subcats of ‘Books’ on the page. I have the below code that gets me the category number and writes it .. which i dont need.
I want the wp_list_categories to only list the children of the category they are in
<?php $cat = get_the_category(); $cat = $cat; echo $cat->category_parent; wp_list_categories('child_of=21'); ?>
- The topic ‘[Resolved] Listing Subcats on a Category Page’ is closed to new replies.