Home › Forums › Add-ons › Repeater Field › Limit nested repeater results to 2 › Reply To: Limit nested repeater results to 2
Hi @lsterling03,
Looking at the code it does not look like nested repeaters are supported because both the has_sub_field
and get_sub_field
functions use the same ACF global $GLOBALS['acf_field']
.
Nesting them will cause unwanted side affects. So, your inner break is working correctly but pointer in the global will have moved to the end, thus exiting the outer loop too.
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.