Hi, is it possible to query posts filtered by “post object” custom field values?
I can’t understand what to write in ‘meta_value’.
$args = array(
'post_type' => 'product',
'meta_key' => 'acf_post_object',
'meta_value' => 'the title'
);
If I view post object data through print_r, I can see [ID], [post_name] or [post_title].
I need to query posts (e.g. products) which has ‘acf_post_object’ (post object custom field) title (or ID, or name) equal to the one specified in ‘meta_value’.
Should I call setup_postdata(); somewhere?
Thanks
Hi what was your solution to this. As that page stipulates the use of an ID, and I would like to use title as you posted originally.
Thanks.