Home › Forums › ACF PRO › Flexible content inside a repeater field › Reply To: Flexible content inside a repeater field
I looked back and saw that I forgot something important. My code above will create and infinite loop. Someday I should right a book on how to do it 😛
if (have_rows('repeater_field')) {
while (have_rows('repeater_field')) {
the_row();
if (have_rows('flex_content_field')) {
while (have_rows('flex_content_field')) {
the_row(); // forgot this line
$layout = get_row_layout();
// and the rest of your flex field output
} // end second while have rows
} // end second if have rows
} // end first while have rows
} // end first if have rows
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.