Limiting category list to a sub-category tree
-
I’m not certain if this is more of a ‘hack’ question or a ‘template’ question ^^;;
I was wondering if there’s a way to effectively chroot the category list (as displayed by wp_list_cats(); or any other currently available function) to a specific category. For instance, suppose I have the following categories:
ID Name Parent
1 Cat-01 0
2 Cat-02 0
3 Cat-03 1
4 Cat-04 2
5 Cat-05 1
And I wanted my category list to begin with Cat-01, only listing the subcategories under it. I.e.
Cat-01
Cat-03
Cat-05
Ideally, it would be possible to set the category root like so:
wp_list_cats(1)
Is something like this currently possible? I’m prepared to write this myself, if not, but just wanted to make sure I wasn’t duplicating effort if it was already possible ^_-
TIA!
- The topic ‘Limiting category list to a sub-category tree’ is closed to new replies.