Using the Combo Blocks plugin, you can easily query posts by categories for Post Grid or Post Grid – Filterable Gutenberg blocks.
To begin, insert the “Post Grid” or “Post Grid – Filterable” block.
![How to query post by categories? 1](https://i.imgur.com/PxTNXsQ.png)
From the List View make sure you’ve selected Post Query nested block. This selection is important to access all the available block settings for “Post Query”.
![How to query post by categories? 2 6yX4J7b](https://i.imgur.com/6yX4J7b.png)
Now under Query Post => Add Query Params select the Category In option
![How to query post by categories? 3 21OQapH](https://i.imgur.com/21OQapH.png)
Expand the Category In selection and here you need to pass the category ID that you want to query from.
![How to query post by categories? 4](https://i.imgur.com/xOr0Lcv.png)
Not sure how to find the Category ID? Go to Posts => Categories, and Edit the category that you want to query from.
![How to query post by categories? 5 JlmUmuc](https://i.imgur.com/JlmUmuc.png)
Now from the URL section, you’ll find the category ID.
![How to query post by categories? 6 l4Emwk8](https://i.imgur.com/l4Emwk8.png)
That’s how you can query posts by categories for “Post Grid” or “Post Grid – Filterable” Gutenberg block. If you still need help, please create a support ticket on our forum.