Mar 03, 2016 UPDATED: Updated all routes in this post so now should be compatible with WP API V2 beta 12. Feb 28, 2016 UPDATED: Just realised since v2 beta 4,/posts
WP_Query
vars was moved back tofilter
param. I'll update all routes in this post ASAP.
In the post adding fields to the JSON response of the WP REST API, you’ve learned about how to manipulate the data from the WP REST API (WP-API). Another topic I got asked very often, is how to get posts by certain filters – mostly taxonomy and meta field. So today let’s talk about it.
Before we get started, if you’re looking for the workarounds for WP-API v1.x, Josh has written great tutorials for you. Here are the links of them:
In the following article, I’ll show you the quick answers and a more bigger picture beyond them. If you’re not interested in the later one, feel free to skip it.