I have post types named "tour" and "country". "tour" post type has some custom fields and type of one of them is Post Object and filtered by Post Type "country".
Now I want to show tours filtered by a specific country, for example:
$located_tours = get_posts(array(
'numberposts' => 3,
'post_type' => 'tour',
'meta_key' => 'country',
'meta_value' => 'turkey'
));
But the result for this query shows nothing.
I know "country" I have used as meta_key is an object, but how can I use it correctly in my query?
Anyone has any idea? Thanks