Display a list of post in the same category


I’m trying to display on a post a list of related posts belonging to the same current subcategory. Something must be wrong with my query as I’m getting a list of post belonging to all categories.

Is it possible to set the query so it can pick up the current category? This way I only need one template for all of my posts.

Thank you for the help!

Hi @A375929,

Sorry to hear you’re experiencing trouble with this.

You should be able to achieve this by setting up a taxonomy query, as shown below:

Hope this helps!

1 Like

It did the trick, thank you!

1 Like

@Araminta i have a similar though more complex problem : i have a CPT called “activity” and i have 2 categories “winter” and “summer”, and a lot of subcategories such as “ski” “hiking”, “rock climbing”, etc.
I’d like to display only posts from the grand-parent category = winter or summer. How can i do this ?