Thanks for the answer!
It turns out I also found out about this very shortly before you answered…
I had searched for ways to use it and none of the example made mention of that. Maybe it is so evident that only a dumb dumb like me would not know it 😉
'meta_query' => array(
array(
'key' => 'hospital',
'value' => array( 3, 4 ), // array of hospitals IDs from 1st query
'compare' => 'IN',
),
Cool?
Not cool 🙂
This does not work in my particular case. I can query with a single ID and compare “LIKE” but not with an array of IDs and compare “IN”.
This is very useful information!
I would like to know why arrays as value don’t seem to work for this either using “LIKE” or “IN”?
I have been banging my head against the wall for hours with this…
If I put a single ID with the compare “LIKE” it works like a charm. But if I put an array in the value, it queries no posts whatsoever…