So there are activities with more than one custom field checkbox value, but I need to only display the ones that has only a single value named type “Sports”. So that if a post has “Sports” and “Works” it isn’t considered in the query. I’m aware compare like doesn’t behave this way…
starting code:
$args = array (
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'type_activity',
'value' => 'Sports',
'compare' => 'LIKE',
),
),
'meta_key' => 'fecha_de_inicio',
'orderby' => 'meta_value',
'order'
Not sure but something like this should work
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'type_activity',
'value' => 'Sports',
'compare' => 'LIKE',
),
array(
'key' => 'type_activity',
'value' => 'Works',
'compare' => 'NOT LIKE',
),
),
Thank you so much that did it!!! 🙂