I need to exclude the loop two post with different values in your meta key (the same). I investigating got this code that works fine if I enter only one value in value =>
. But if I want to enter two values it gives me error.
$args = array(
'cat' => 1,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'Caja',
'compare' => 'NOT EXISTS'
),
array(
'key' => 'Caja',
'value' => array('UNO','DOS'), // Here I return an error php: Warning: trim() expects parameter 1 to be string, array given
'compare' => '!='
),
),
);
I used this post as a reference.
Any ideas?