Filtering multiple custom fields with WP REST API 2
-
I want to filter posts based on multiple acf custom fields with AND relation. Something like this:
$args = array( 'post_type' => 'product', 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'color', 'value' => 'blue', 'compare' => '=', ), array( 'key' => 'price', 'value' => array( 20, 100 ), 'type' => 'numeric', 'compare' => 'BETWEEN', ), ), );
I might even have more filters. How can I convert these to REST API 2 filters?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Filtering multiple custom fields with WP REST API 2’ is closed to new replies.