Home › Forums › General Issues › while ( have_rows() ) within while ( have_rows() ) › Reply To: while ( have_rows() ) within while ( have_rows() )
You’ve got the answer, you can’t.
To do this you really need to forget about using the ACF have_rows() loops and instead get the contents of the repeater and use the array it returns
// return all the contents of the repeater in a nested array
$slides = get_field('slide');
// loop over array
if ($slides) {
foreach ($slides as $slide) {
// output information from this slide
foreach ($slides as $inner) {
// output nested slide information
} // end nested foreach
} // end outer foreach
}
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.