Home Forums Add-ons Repeater Field Loops files with URL Reply To: Loops files with URL

  • I just did the same thing, below is how I did it. Since Elliot added the have_rows function in 4.3 ( it’s much easier to get it to work. My code might not be optimal (been up too long…), but it works.

      $rows = get_field('reaction_videos');
      if($rows) {
        echo '<h3 class="reaction">Reaction Videos</h3>';
        echo '<ul>';
        while(the_sub_field('reaction_videos')) {
              $video = the_sub_field('reaction_video');
              $desc = the_sub_field('reaction_video_desc');
              echo '<li><a href="' . $video . '" title="' . $desc . '" class="lightbox" rel="foobox">' . $desc . '</a></li>' ;