Support

Account

Home Forums Add-ons Repeater Field Repeater in a repeater

Helping

Repeater in a repeater

  • Hi,

    I want to use a repeater in a repeater. I’m not very good in PHP so that’s why i can’t figure it out. I’m using this code;

       <?php if(get_field('diverse')): ?> 
       
       		<?php while(has_sub_field('diverse')): ?>
    
        <div class="item">
    	<div class="titel"><?php the_sub_field('diverse_titel'); ?></div>
    	<?php the_sub_field('diverse_omschrijving'); ?>
        <ul class="zijnflyer">
                
                	<?php while(has_sub_field('diverse_beeldmateriaal')): ?>
                    <li><img src="<?php the_sub_field('diverse_beeldmateriaal_afbeelding'); ?>" /></li>
                	 <?php endwhile; ?>
                
                
            <?php endwhile; ?>
            
            </ul>
    	</div>
    	<?php endif;?>

    So i want to use a repeater in a repeater en put that code in my template. What am i doing wrong?

  • Hi @mentix

    Your code looks fine. Perhaps you could post what the issue is that you are experiencing?

    Thanks
    E

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Repeater in a repeater’ is closed to new replies.