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.