Child Categories
-
I have nested categories and want to list the child categories if parent category is selected.
That is no brainier as I was able to list them with the following code
if (is_category()) { $cat = get_query_var('cat'); $catlist = wp_list_categories('echo=0&orderby=id&show_count=0&title_li=&use_desc_for_title=1&hide_empty=0&child_of='.$cat); if ($catlist) { echo $catlist; } else { //process the loop } }
But I also want to show the category description alone the Child category Name.
What is the best way to handle that. Is there a way to get the children categories id in an array? so that I can process each and grab the description.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Child Categories’ is closed to new replies.