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:
group_name_repeater_name_X_repeater_subfield
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:
book_videos_bk_videos_0_name
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.