wp_query serialised array
As I commented, if the meta value is a serialized string of an array like array( ‘Melbourne’, ‘Sydney’ ), then ‘value’ => ‘”(Melbourne|Sydney)”‘, ‘compare’ => ‘REGEXP’ would work. So there’s no need for a complex regular expression pattern, and your meta_query could look like so where $locations is an array of locations: ‘meta_query’ => array( … Read more