Hi all,
I’m new to WP and ACF so I’m having trouble writing the proper query for what I’m trying to achieve.
I have a custom post type called “guide” that contains many “sections” (repeaters). Those sections each contain a “section_title” (text) and a “section_posts” (repeater) fields.
I would like to display the guide on a post if that post is part of a guide (in any of the sections).
This is my current non-working query:
$guides = get_posts(array(
'numberposts' => '1',
'post_type' => 'guide',
'meta_query' => array(
array(
'key' => 'section_posts', // this is probably wrong
'value' => '"' . get_the_ID() . '"',
'compary' => 'LIKE'
));