Get WP Posts in Category

List theĀ  WP posts when category is given

If you need to run custom query you can use the WP_Query()

In the following example you can get the all posts in the category where the ID is equal to 10