Afaik, there’s no relation
key for meta_query
. Use compare
instead and maybe also specify a type
to speed things up with skipping types that are out of scope.
EDIT
$args = array(
'post_type' => 'product',
'meta_query' => array(
// Used to set two meta keys IN RELATION TO EACH OTHER
'relation' => 'OR',
array(
'key' => 'color',
'value' => 'blue',
// Used to FILTER OUT/IN/LIKE THE VALUE NAME
'compare' => 'NOT LIKE'
),
array(
'key' => 'price',
'value' => array( 20, 100 ),
'type' => 'numeric',
'compare' => 'BETWEEN'
)
)
);
$query = new WP_Query( $args );