Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#38941 closed defect (bug) (wontfix)

REST API - filter syntax isn't available

Reported by: andfinally's profile andfinally Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords:
Focuses: rest-api Cc:


I'm on WordPress 4.7 beta 4, and I'm finding the filter syntax isn't working.

The filter argument is listed in the v2 docs But when I do a GET request to /wp-json/ filter is not listed in the args for the /wp/v2/posts GET endpoint.

I have three posts in my local environment. When I do a GET request to /wp-json/wp/v2/posts/?categories=2 I get the one post that belongs to the category with the ID 2. This category has the name News and slug news.

When I do requests like
I get all three of my posts. From what I read on StackOverflow, this suggests the API isn't recognising the filter.

Change History (3)

#1 @swissspidy
7 years ago

Hey there,

The filter param has been removed on purpose. See #38378 for more information. The docs haven't been updated yet.

#2 @andfinally
7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

I see! Thanks - good to know. I'll close this.

#3 @johnbillion
7 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.