Home › Forums › Add-ons › Repeater Field › Show ACF values from nested repeater on another page template › Reply To: Show ACF values from nested repeater on another page template
Hey markymark, glad that you got your problem solved. I’m having a similar issue that maybe you can help with.
So I’ve created a Repeater File Upload with ACF so the admin can upload multiple files to a page.
My repeater is named “downloads”. My secondary field is called “files”.
Here is the code I’m using to display the files on my page.
if( have_rows('downloads') ):
while( have_rows('downloads') ) : the_row();
$value = get_sub_field('files'); ?>
<pre><?php echo $value[3]; ?><br><?php
print_r(array_values($value)); ?></pre>
<?php endwhile;
endif;
the line print_r(array_values($value));
prints the entire array for each file.
the line echo $value[3]
is supposed to echo the name of the file but I get nothing.
Any ideas or suggestions would be helpful.
Thanks!
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.