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.

Expanding the response with embeds

Expanding the response with embeds - WordPress Tutorial

From the course: WordPress: REST API

Start my 1-month free trial

Expanding the response with embeds

- [Morten] Now that you've seen how we use Postman to interact with the WordPress REST API, let's take a closer look at the response from the REST API and how we can expand it. Here, I encourage you to play along using Postman and a WordPress site of your choosing. I've set my environment to mor10.com, I'll go over the Collections and select the Posts route. This is the route that we requested previously. So here, I get the 10 most reasoned posts from my site. Looking that this response, you'll see we get the entire post for each of these posts. So here we have all the information that's stored from the post: ID, date, modified date, the slug for the post, the status, the title, the content, the except comes down here, then the author ID, the featured media IDs, and that would be the featured image, and that's the post for the featured image, and whether or not there are comments available, if it's a sticky post, and so…

Contents