Support

Account

Home Forums Add-ons Repeater Field Hide Empty Repeater Field Images Reply To: Hide Empty Repeater Field Images

  • Hi @lukeshield

    You should be able to do it like this:

    <?php if( get_sub_field('carnivore_option') ){ ?>
        <div><img src="image1.jpg"><?php the_sub_field('carnivore_option'); ?></div>
    <?php } ?>
    <?php if( get_sub_field('dairy_option') ){ ?>
        <div><img src="image1.jpg"><?php the_sub_field('dairy_option'); ?></div>
    <?php } ?>

    I hope this helps 🙂