jussikinnula/wp-rest-filter

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (0.1) of this package.

Restores the 'filter' param to post endpoints

Installs: 533

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 42

Type:wordpress-plugin

0.1 2017-01-27 11:19 UTC

This package is not auto-updated.

Last update: 2021-05-15 11:03:26 UTC


README

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.

Usage

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( 'https://example.com/wp-json/wp/v2/posts?filter[name]=the-slug');