New Edit
How to select posts where ‘post_meta’ has one of $defaults
key !
$defaults = array(
'artist_139' = 139,
'artist_125' = 125,
'artist_165' = 165,
'artist_189' = 189,
'artist_149' = 149,
);
$followingposts = new WP_Query(array(
'post_type' => 'songs',
'meta_query' => array(
array(
'key' => 'myfield',
'value' => $defaults,
'compare' => 'IN'
)
),
));
And (get_field(‘myfield’) returns:)
get_field('myfield') = array(
'artist_139' = 139,
'artist_165' = 165,
);