You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
If you have a bug to report relating to querying for posts, terms, users, comments, etc., please open a new issue — this issue is intended to be a master reference.
This issue is a master issue representing work on query parameters in collections. Here's a table of the currently supported parameters:
+----------------+-------+-------+-------+----------+------------+-------+-------+
| param | posts | pages | media | comments | categories | tags | users |
+----------------+-------+-------+-------+----------+------------+-------+-------+
| after | x | x | x | x | | | |
| author | x | x | x | x | | | |
| author_email | | | | x | | | |
| author_exclude | x | x | x | x | | | |
| before | x | x | x | x | | | |
| context | x | x | x | x | x | x | x |
| exclude | x | x | x | x | x | x | x |
| filter | x | x | x | | | | |
| hide_empty | | | | | x | x | |
| include | x | x | x | x | x | x | x |
| karma | | | | x | | | |
| media_type | | | x | | | | |
| menu_order | | x | | | | | |
| mime_type | | | x | | | | |
| offset | x | x | x | x | | x | x |
| order | x | x | x | x | x | x | x |
| orderby | x | x | x | x | x | x | x |
| page | x | x | x | x | x | x | x |
| parent | | x | x | x | x | | |
| parent_exclude | | x | x | x | | | |
| per_page | x | x | x | x | x | x | x |
| post | | | | x | x | x | |
| search | x | x | x | x | x | x | x |
| slug | x | x | x | | x | x | x |
| status | x | x | x | x | | | |
| type | | | | x | | | |
+----------------+-------+-------+-------+----------+------------+-------+-------+
Well yes, but there are tons of plugins that do provide a menu_order. In the previous beta menu_order was still allowed, but now it's blocked. Do you know what's the proper way for me to re-enable that again (just for myself)?
@joneslloyd id isn't a WP_Query param nor do I believe there is an id param being added to filter as a mask for the WP_Query params. So I am pretty sure filter[id] doesn't work causing everything to be returned. To do what you are trying to do I highly recommend this. /wp/v2/my-cpts/333 or if you want filter it could be /wp/v2/my-cpts?filter[p]=333.
When trying to filter by post parent (as above in previous reply) it returns a blank array.
I can check about the use of post_parent and see if I can duplicate an empty result set. @joneslloyd please open this in a separate issue if you want it addressed though this is a master reference and not intended for these kind of discussions.
Activity
rachelbaker commentedon Apr 15, 2015
Punting to Beta 2.
rachelbaker commentedon Jun 15, 2015
Punted to Beta 4
5 remaining items
Add integration tests for retrieving taxonomy terms by id & slug
davidsteinberger commentedon Mar 1, 2016
What was the specific reason to remove
menu_orderfrom the posts-endpoint?danielbachhuber commentedon Mar 2, 2016
Posts don't support
menu_order, Pages do.davidsteinberger commentedon Mar 2, 2016
Well yes, but there are tons of plugins that do provide a menu_order. In the previous beta menu_order was still allowed, but now it's blocked. Do you know what's the proper way for me to re-enable that again (just for myself)?
joneslloyd commentedon Mar 3, 2016
Hey - just asking to confirm:
Right now will filtering a CPT to those with a specific parent ID not work?
For example:
http://example.com/wp-json/wp/v2/my-cpts?filter[parent]=304?If not, do you know if this is something in progress? I can help achieve this if you need an extra hand
danielbachhuber commentedon Mar 4, 2016
You should be able to use
/wp/v2/posts?filter[menu_order]It should work — the filter key is
post_parentthough:/wp/v2/my-cpts?filter[post_parent]=304joneslloyd commentedon Mar 4, 2016
@danielbachhuber Thanks fore getting back to me!
Unfortunately that doesn't seem to be working for CPTs. I've not modified the returned data (etc.) which is weird.
When I try what you've written, I just get
[]returnedjoneslloyd commentedon Mar 14, 2016
Just to let you know, this is definitely an issue.
When trying to filter by ID (
/wp/v2/my-cpts?filter[id]=333) it returns the full set (all posts of the CPT, unfiltered).When trying to filter by post parent (as above in previous reply) it returns a blank array.
BE-Webdesign commentedon Mar 14, 2016
@joneslloyd id isn't a WP_Query param nor do I believe there is an id param being added to filter as a mask for the WP_Query params. So I am pretty sure filter[id] doesn't work causing everything to be returned. To do what you are trying to do I highly recommend this. /wp/v2/my-cpts/333 or if you want filter it could be /wp/v2/my-cpts?filter[p]=333.
I can check about the use of post_parent and see if I can duplicate an empty result set. @joneslloyd please open this in a separate issue if you want it addressed though this is a master reference and not intended for these kind of discussions.
rmccue commentedon Sep 22, 2016
We're closing this ticket out in favour of more concrete tickets instead. If you have anything you need with params, please file a new issue.