You can query posts just fine.
You can filter by category just fine.
But grouping them – category heading once, then the related posts underneath – isn’t obvious at all.
This post walks through a clean, reliable way to do it.
No hacks. No plugins. Just working logic.
Final result

The Bricks setup (high level)
Here’s the approach used:

1. Outer loop: Categories
- Query type: Terms
- Taxonomy:
category - Optional: exclude empty categories if you want a tighter page
This loop is responsible for:
- the category heading
- the container that holds that category’s posts

2. Inner loop: Posts
Inside the category loop, add another query loop:
- Query type: Posts
- Tax query:
- Taxonomy:
category - Field:
term_id - Value: dynamic → current term ID
- Taxonomy:
Now each category only pulls in its own posts.
Clean separation. No duplication.

