A good way to set up a nested category structure
-
I’m having doubts about the logic of a website I’m trying to set up. It needs to display two levels of categories before getting to the posts i.e parent cats ->child cat->posts. What I currently have is:
Level one – List of Parent Categories: I have a page template using get_categories() to loop through a show all parent categories. I have a representative photo for each category using a plugin so it looks all pretty
Level two – List of Child Categories: This I am using the category.php file in the theme as part of the template hierarchy. This again shows child cats using get_categories()
Level three – List of articles in the child category: This is where I am stuck. I think I should now be using category.php to show the posts but I have already used that above. Happy to change but then how should I handle level two?
Any help would be much appreciated.
- The topic ‘A good way to set up a nested category structure’ is closed to new replies.