Ok, I missed to say, that I’m using ACF anb “tipus” i a multiple select.
Seems this query works …
$values = array('music');
$meta_query_or = array('relation' => 'OR');
foreach ($values as $value) {
$meta_query_or[] = array(
'key' => 'tipus',
'value' => $value,
'compare' => 'LIKE'
);
}
$args = array(
'category_name' => 'test',
'posts_per_page' => -1,
'meta_query' => array(
'relation' => 'AND',
$meta_query_or, ...
)
);
‘IN’ checks against the key, not the value. See: https://github.com/WordPress/wordpress-develop/blob/6.7/src/wp-includes/class-wp-meta-query.php#L677
I think you are rather looking for ‘LIKE’ for your use case.