child_of not working with wp_list_categories
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:
with no arguments, it prints out the tree correctly! Anyone know what I’m doing wrong?
- The topic ‘child_of not working with wp_list_categories’ is closed to new replies.