Home › Forums › General Issues › Looping through a group with a nested repeater › Reply To: Looping through a group with a nested repeater
The way nested repeaters in a group field stores its subfield values is:
Where X is the repeater row and it increments starting at 0 so if you had a field called name in your book videos nested repeater, if any post had a value there, it would be at:
That being said, you could adjust your meta_query to just query if that key exists, you don’t need to check if the group exists, as well. You’d just grab every post that has something in the first repeater spot for any required subfield value of the repeater. Does that make sense?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
💻 The next ACF Chat Fridays features a live demo of one of our most highly-requested features: registering CPTs and custom taxonomies directly in ACF. Don’t miss it!— Advanced Custom Fields (@wp_acf) February 27, 2023
📆 Friday 3rd March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/j4r4ouQtz9
© 2023 Advanced Custom Fields.