Quantcast
Channel: Tagged with repeater - Plugin Support
Viewing all articles
Browse latest Browse all 160

conditional for repeater field with no results option

$
0
0
Hi i am using this code for a repeater field "todo" in my template:

if( get_field('todo') ): ?>

<?php while( has_sub_field('todo') ): ?>



<?php the_sub_field('link'); ?>




<?php endwhile; ?>

<?php endif; ?>

It works as expected. However I would like to include the option for a no result event of the sub_field.

At the moment all html tags within the the while loop get outputted even if the sub_field "link" is empty.

Cheers



Viewing all articles
Browse latest Browse all 160

Trending Articles