Home Forums ACF PRO Query nested repeater fields


Query nested repeater fields

  • 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(
          'key' => 'section_posts', // this is probably wrong
          'value' => '"' . get_the_ID() . '"',
          'compary' => 'LIKE'
  • This thread helped me figure out the answer. Make sure look at extrasmall’s answer to get it working.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.