Restores the `filter` param to post enpdpoints.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 6e3732e May 2, 2017
Failed to load latest commit information.
LICENSE Initial commit Dec 4, 2016 Add reamde Dec 5, 2016
plugin.php Merge pull request #5 from ashhitch/master May 2, 2017

WP REST API - Filter parameter for posts endpoints

In WordPress 4.7 the filter argument for any post endpoint was removed, The filter argument allows the posts to be filtered using WP_Query public query vars. This plugin restores the filter parameter for sites that were previously using it.


Use the filter parameter on any post endpoint such as /wp/v2/posts or /wp/v2/pages as an array of WP_Query argument like so:

fetch( '[name]=the-slug');