Name: rest-filter
Owner: WordPress REST API Team
Description: Restores the `filter` param to post enpdpoints.
Created: 2016-12-04 19:35:25.0
Updated: 2018-05-08 14:11:18.0
Pushed: 2018-05-02 00:50:09.0
Size: 9
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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:
h( 'https://example.com/wp-json/wp/v2/posts?filter[name]=the-slug');