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; ?><br><?php print_r(array_values($value)); ?></pre> <?php endwhile; endif;
print_r(array_values($value)); prints the entire array for each file.
echo $value is supposed to echo the name of the file but I get nothing.
Any ideas or suggestions would be helpful.
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!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 29, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.