child_of not working with wp_list_categories
-
Hi all,
I have a list of categories that includes several sub-categories in the tree. When I use the wp_list_categories function to print these out, this works perfectly. However, when I add the child_of paramter and pass it a number of the category it just returns ‘No categories.’
$args = array( 'child_of' => 5, 'hide_empty' => 0 ); wp_list_categories($args);
This returns ‘No categories’. But, if I just do:
wp_list_categories();
with no arguments, it prints out the tree correctly! Anyone know what I’m doing wrong?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘child_of not working with wp_list_categories’ is closed to new replies.