• Greetings all!

    I have some data that I need to categorize in 3 parts. For example, one item may be in Category “Farm Products” / sub-Category “Dairy” / sub-sub-Category “Cheese”.

    I am looking to have all top-level Categories (Farm Products) display on a page and upon clicking one, it brings you to a page listing that top-level categories children (Dairy). And upon clicking that (Dairy), it brings you to a page listing the next line of children (Cheese).

    I’m wondering how I can display this, page by page.

    Any hints or suggestions on where to look or how to start is very much greatly appreciated. Thank you

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Use get_categories() with the ‘parent’ parameter to get all categories that are immediate children only, no grandchildren. Everything can be done on the same category archive template if you can determine in script when to show child categories and when to show posts in that category. This depends on how you use the categories. It could be the posts are simply displayed when a category has no children. Or maybe in addition to child categories, posts are also shown if the number returned is less than a certain threshold. Or maybe once one is so many levels down. Or…

Viewing 1 replies (of 1 total)
  • The topic ‘Displaying parent, sub and sub-sub Categories, each on different pages.’ is closed to new replies.