Support

Account

Home Forums Add-ons Repeater Field Make repeater field meta not display if there is not data in it Reply To: Make repeater field meta not display if there is not data in it

  • Looks like I had part of my code wrong. Here’s what I’m currently using:

    <?php if( have_rows('google_drive_links') ): ?>
    <hr />
         <h3>Attachments</h3>
         <ul class="google-drive-links">
    <?php while( have_rows('google_drive_links') ): the_row(); 
         // vars
         $content = get_sub_field('google_link_name');
         $link = get_sub_field('google_link'); ?>
         <li class="google-drive-link-item">
         <a target="_blank" href="<?php echo $link; ?>"><?php echo $content; ?></a>
        </li>
    <?php endwhile; ?>
    </ul>
    <?php endif; ?>