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.
It seems to not actually filter any posts and also it then causes the page and per_page parameters to no longer work when the filter parameter is present in the url
Could you give me an example of how you would pass the filter as part of
the request. Is it just a string as a query parameter?
On 13 Nov 2015 5:54 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
I am on the latest beta
Do you have any PHP filters that are modifying the request, by chance?
Thank you but how would you actually search the text of each post and only
return matches based on the search parameter
On 13 Nov 2015 5:58 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
Yes if you see from the URL I sent you I tried exactly this with
filter=search string and I just got returned the first ten posts no matter
the filter passed in
On 13 Nov 2015 6:06 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
Haaaaa thank you I thought the use of the [s] meant the parameter could
either be filter OR filters! Thanks for clearing that up and all your help
today
On 13 Nov 2015 6:14 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
Yes if you see from the URL I sent you I tried exactly this with
filter=search string
Activity
danielbachhuber commentedon Nov 13, 2015
Can you share the request you're making, the version of the plugin you're using, and the actual result you see?
devotox commentedon Nov 13, 2015
http://doctifyblog.com/wp-json/wp/v2/posts?page=1&per_page=1&filter=blah
I am on the latest beta and hitten the link will show you the actual result
danielbachhuber commentedon Nov 13, 2015
Do you have any PHP filters that are modifying the request, by chance?
filterworks as expected for me locally:filterwill overrideper_pageandpageiffilter[posts_per_page]orfilter[paged]are providedWP-API/lib/endpoints/class-wp-rest-posts-controller.php
Line 93 in 8e1cb40
devotox commentedon Nov 13, 2015
Could you give me an example of how you would pass the filter as part of
the request. Is it just a string as a query parameter?
On 13 Nov 2015 5:54 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
danielbachhuber commentedon Nov 13, 2015
GET http://wordpress-develop.dev/wp-json/wp/v2/posts?per_page=1&filter[posts_per_page]=2devotox commentedon Nov 13, 2015
Thank you but how would you actually search the text of each post and only
return matches based on the search parameter
On 13 Nov 2015 5:58 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
danielbachhuber commentedon Nov 13, 2015
GET http://wordpress-develop.dev/wp-json/wp/v2/posts?filter[s]=search+stringdevotox commentedon Nov 13, 2015
Yes if you see from the URL I sent you I tried exactly this with
filter=search string and I just got returned the first ten posts no matter
the filter passed in
On 13 Nov 2015 6:06 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
danielbachhuber commentedon Nov 13, 2015
You shared:
To search for "blah", the proper request would be:
Notice
filter[s]devotox commentedon Nov 13, 2015
Haaaaa thank you I thought the use of the [s] meant the parameter could
either be filter OR filters! Thanks for clearing that up and all your help
today
On 13 Nov 2015 6:14 p.m., "Daniel Bachhuber" notifications@github.com
wrote:
devotox commentedon Nov 17, 2015
That worked perfectly.
A couple of other questions now