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!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.