01/12
2017
A Composer wrapper for the "REST API Search" WordPress plugin
This adds the missing functionality of Search into the WordPress REST API. The issue being with the current REST API Version 2, you can only search on a per post_type basis., (*1)
/wp-json/wp/v2/posts?filter[s]=apples /wp-json/wp/v2/pages?filter[s]=apples
Adds the search functionality for all posts types except revisions and types with 'exclude_from_search' set to true., (*2)
/wp-json/wp/v2/search/apples
In case of a multi word string, just replaces the spaces with plus signs., (*3)
/wp-json/wp/v2/search/apples+pears
Also adds easy paging, (*4)
page 2:, (*5)
/wp-json/wp/v2/search/apples+pears/2
page 3:, (*6)
/wp-json/wp/v2/search/apples+pears/3