I need a way to display a list of subcategories of a category. Like this:
“Please click a country for a list of our current projects:
• Sri Lanka”
With Projects (parent) and Africa and Sri Lanka being subcategories (children).
When the user clicks on Projects, I’d like a list of the subcategories to appear, instead of the default list of posts in all of the categories.
I’ve managed to make the page display the categories of the posts (5 Africa’s and 2 Sri Lanka’s due to the amount of posts), but I can’t seem to find anything that’ll let me display the children of a parent as a list.
I’m guessing I can do this by using get_the_category_list() or the_category() and utilising some arcane argument/parameter, but I’m at a loss.
- The topic ‘How to display children of a category’ is closed to new replies.