meta_query with array as value with multiple arrays
The default relation is AND so you really don’t need to specify that, but I’ll show you how to do it anyway. Really, you just have an array manipulation problem. $amenities = array(‘a’,’b’,’c’); $amenities2 = array(‘d’,’e’,’f’); foreach ($amenities as $a) { $arrays[] = array( ‘key’ => ‘amenities’, ‘value’ => $a, ‘compare’ => ‘LIKE’ ); } … Read more