[wp-trac] [WordPress Trac] #47194: Posts endpoint: Enable collection parameters for querying by custom field
WordPress Trac
noreply at wordpress.org
Wed May 8 20:40:35 UTC 2019
#47194: Posts endpoint: Enable collection parameters for querying by custom field
--------------------------+-----------------------------
Reporter: coreymckrill | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
Before the REST API was merged into Core, meta queries were possible via a
filter parameter:
{{{
posts?filter[meta_key]=foo&filter[meta_value]=bar
}}}
This was [ticket:38378 removed] when the API was merged. In a
[https://wordpress.slack.com/archives/C02RQC26G/p1557261445107000 recent
Slack discussion] @kadamwhite mentioned this was due to the potential for
very expensive DB queries, but that improvements to meta registration in
subsequent versions of WP may have made this more possible.
There are abundant use cases for being able to query posts via the API
based on postmeta values, but I haven't been able to find any other Trac
tickets about this. So I'm asking the question: would this be feasible
now?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47194>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list