0

The structure is simple, most posts will have only one category but some might be in a child of that category. I want to display the ones without a child category first, and then all the posts belonging to the child categories separated by a hr tag. Like I illustrated in the figure. The child categories can display all posts, i.e. if a post has two child categories it would show up under all of the child sections.

  • This problem is too big to bite off, you need to break it up into smaller problems. There are at minimum 3 sub-questions here which should be asked as separate questions, e.g. "How do I get posts in a term, but not its child terms?", "How do I show posts in a term?" "How do I get a list of child terms?" etc – Tom J Nowell Apr 25 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.