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 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
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