From the course: WordPress: REST API

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Find posts in a category

Solution: Find posts in a category - WordPress Tutorial

From the course: WordPress: REST API

Start my 1-month free trial

Solution: Find posts in a category

(upbeat music) - [Instructor] Welcome back, did you find the answer? This challenge forces you to think carefully about how the REST API works and what it tells you. So if you had a bit of trouble, that's to be expected. There are several solutions to this challenge, some of them are more labor intensive than others, so let me walk you through what I think is the most straightforward one, and explain my thought process while doing it. Remember in the challenge, I say you need to find the posts that are filed under the category with the description posts that have media-related tests. The trouble is, we can't really query the REST API for a category based on it's description, so instead we need to go look at all the categories, and then find the category with the right description, and then go from that category to find out which posts are filed under it. And all of that is possible with the REST API, you just have to do it…

Contents