Listing Cateogries and Children in Archive
-
Hello all,
I am trying to set up a sub navigation using the archive.php page. I’ll like to have it look something like this:
Parent Category
Child Category 1
Child Category 2
Child Category 3
Child Category 4I am having trouble figuring out how to get that info. For example, So I need the sidebar to query what category it is in, list that title and then list the children of that category. I don’t quite understand how the query loop on the archive page is working so am not quite sure how (or if) I can pass that variable to wp_list_categories.
Here’s an example, right now how I list out the children of the category is with this:
<?php wp_list_categories(‘orderby=id&title_li=0&child_of=3′,’- ‘,’
‘); ?>
So, I’d like to replace the ‘3’ for a variable that is using the category that is currently being browsed on archive.php. Make sense?
Thanks!
- The topic ‘Listing Cateogries and Children in Archive’ is closed to new replies.