How to list sub-categories on a category page?
-
Worth a shot, but my questions are never answered (I think I am asking for more that the general consensus can answer).
I have the main navigation menu, a custom menu, running along the top.
Underneath that, I want show selective categories.I have a Blog page, and a Portfolio page.
I want the Portfolio page to list the sub-categories for Portfolio, and the Blog page to list every other parent category (sibling to Portfolio), excluding Portfolio.I’ve got some programming to list the categories, either parent or child, depending on what webpage is being viewed – Portfolio shows Children and all Pages show the Parents; I only want the Blog to show Parent Categories, not every page.
The only thing I could think of is to add else if‘s to my code, one is_page and one is_category.
The downside to that is adding new pages with the sub-menu. Any way to do it by default, like “if sub-pages/sub-categories/children”?
I could use custom menus, but that causes more work that before.
- The topic ‘How to list sub-categories on a category page?’ is closed to new replies.