Support

Account

Home Forums Front-end Issues Nested Repeater Variable Only Returning Only One URL Reply To: Nested Repeater Variable Only Returning Only One URL

  • Hi guys, got this figured out. Turns out rather than trying to define a “$tracks” variable, which can obviously only store one item, i left out the sub-repeater loop in the declaration area and simply used

    <div class="talenthalf"><strong><u>Audio Samples</u><br />
    							<?php 
    							if( have_rows('audio_samples_parent') ): ?>
    								<ul>
    								<?php 
    
    								while( have_rows('audio_samples_parent') ): the_row();
    
    									?>
    									<li>
    										<audio controls>
      											<source src="<?php the_sub_field('audio_tracks'); ?>"  type="audio/mpeg">
    										</audio>
    									</li>
    
    								<?php endwhile; ?>
    
    								</ul>
    							<?php endif;
    							?>
    					</strong></div>

    to loop through the files uploads. Hope this helps someone else!