wp_list_cats() show all childs of parent regardless
Let’s say I have 3 main categories which can be displayed as:
<?php wp_list_cats(‘children=0’); ?>
When this category is clicked it shows all children of that category:
<?php wp_list_cats(‘&child_of=’.$_GET[‘cat’]); ?>
So far so good,
The problem is if there are multiple children of the parent, it drops the other children when one of the child links is clicked.
How would I modify the code to look for all children. Basically look back up the chain to the parent and use that catID to display all child links for the parent always.
Thanks for any help.
- The topic ‘wp_list_cats() show all childs of parent regardless’ is closed to new replies.