I am using Advanced Custom Fields plugin with WordPress. I am using relationship custom field.
$posts = get_posts(array(
'post_type' => 'slos_trainings',
'meta_query' => array(
array(
'key' => 'lokacija', // name of custom field
'value' => 79,
'compare' => 'LIKE'
)
)
));
I would like to pass array into meta_query value. Currently my code is working and it is returning all custom post types slos_trainings that have location custom meta field set to 79. But this field is a relationship, so it can have multiple ID-s. For example I want to find all posts with type slos_trainings that have lokacija set to 79 OR 200 OR 124, etc,..
How can I do this?
1 comment