If you just wanted to know if it’s possible, then yes it is possible.
But the problem as I could see it from your edited question, is that you set the compare
to =
which should instead be IN
.
However, you didn’t actually have to set it because when you supply an array of values, the operator will default to IN
.
So the correct code would be:
'meta_query' => array(
array(
'key' => 'user_charname',
'value' => array('spongebob', 'mickey'),
'compare' => 'IN' // use IN
)
)