I have custom posts that represent real estate property and they have an ACF field of price. I'm trying to use the WP Rest API to query a certain price range, but to no avail.

E.g. querying the following URL returns all items rather than specific ones:


Even querying a specific price returns all items, e.g.:


I've already added the relevant variables via the rest_query_vars filter:

function bones_allow_meta_query( $vars ) {    
    $vars[] = 'meta_key';
    $vars[] = 'meta_value';
    $vars[] = 'meta_query';

    return $vars;
add_filter( 'rest_query_vars', 'bones_allow_meta_query' );

It seems as though the filter query is completely ignored. What am I doing wrong?

1 Answer 1


Couldn't get it to work. The only solution that I found was to setup a custom endpoint:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.