wp_list_categories needs a child depth argument
I have requested this before but nothing official .. so here is the official request;
The WP_LIST_CATEGORIES function seriously needs some form of child depth argument such that I can limit the number of children that show up.
My theme is designed such that you get the Parent category, and one layer of children. Childrens Children shouldn’t show up. This is exactly how I want it.
What I propose is a simple flag in the wp_list_categories function that says how deep to go.
Depth=0 :: Default – show everything as you do now.
Depth=1 :: show only the top level of categories, no children.
Depth=2 :: show the top level of categories, and their children.
Depth=3 :: Show the top level of categories, their children and their children’s children..
This would easily work with the child_of argument and allow users more customization when it comes to how they want things displayed.
- The topic ‘wp_list_categories needs a child depth argument’ is closed to new replies.