I have 7 Categories (parents), and every category has 15 sub-categories.
When I select some category (parent), I want to display only sub-categories (children) of that particular parent category (parent).
After I click on sub-category (child) then it should display its posts only.
I have a fron_page.php
and category.php
.
How can I write this to first show sub-categories separately, then post of that sub-category separately in new file, which user want to see.
This code should help you:
OR
Let me know please.
Good luck! 🙂
1) Showing only Subcategories:
2) Showing All Top Categories:
3) Showing All Top Categories + Subcategories like a Tree menu:
4) view this topic