Can't filter the posts list by any of the Arguments i see in documentation
-
Hallo,
I’m running WP v. 4.4.2
WP REST API plugin v. 2.0-beta12
WP REST API Meta Endpoints v. 0.1.0I would like to filter the collection of posts that I get with
https://my-test-site.it/wp-json/wp/v2/posts/
by one or more of the arguments I see listed in the documentation here: https://v2.wp-api.org/reference/posts/Note that I’m acting as an autenthicated user.
For example, if I want only 2 posts i try
https://my-test-site.it/wp-json/wp/v2/posts/?per_page=2
but I still get all the postsI saw googling that some suggest to user the argument “filter” to access the query vars instead, but even with it all my “filter” are just ignored.
example:https://my-test-site.it/wp-json/wp/v2/posts/filter[post_status]=draft
but I still get alse the posts “published”, “pending” etcSo to me it looks like all of that arguments/parameters are just “stripped out” and ignored… but more probably I’m doing somethng wrong ??
Can you point me in the right direction?
Thank you!
Stefano
- The topic ‘Can't filter the posts list by any of the Arguments i see in documentation’ is closed to new replies.