Our Combo Blocks plugin will help you query posts by their category. This article gives you a clear idea about how to query posts by their Category.
Click on the Query Post Tab.
Now, by clicking the Choose button, you can search for “Category”. Here you will find some options; click your desired option.
For Category ID:
The Category ID dropdown menu is accessible by selecting “Category ID”. Next, enter the category ID. According to the Category ID, your Post Grid will update.
For Category Name:
Here, type a Category Name. The post grid will update with the specified posts.
For Category And:
You can use this to display relevant posts to the entered Category IDs.
For Category In:
Here you can add multiple Category IDs, which will update the Post Grid by showing those posts related to the Category IDs.
For Category Not In:
You can add multiple Category IDs here, which will hide all related posts based on the IDs.