Answer the question
In order to leave comments, you need to log in
How to use repeater inside repeater -- group in Acf wordpress?
I'm using the pro version of ACF.
Here's the structure:
Ways (Repeater)
-Way (Group)
--list_way (Repeater)
--- Items (text)
And now it's impossible to display the last repeater with text.
The code is like this:
<?php
if( have_rows('ways', 'option') ): ?>
<ul class="way-list">
<?php while( have_rows('ways', 'option') ) : the_row();
$way = get_sub_field('way', 'option'); ?>
<li class="way-item">
<?php
$rows = $way['list_way'];
if( have_rows($rows) ) : ?>
<ul class="way-item__list">
<?php while(have_rows($rows) ): the_row(); ?>
<li><?php echo the_sub_field('items')?></li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question