Home › Forums › Add-ons › Repeater Field › Repeater field FILE › Reply To: Repeater field FILE
Hi Guys
I have updated my code using the repeater field, see below
However i can not get the actual file title to be a link and open the downloadable file.
The url of the file diplays on the front but not as alink to the download
Here is a link to my website: see the code at the bottom of the page
http://www.whiteblackdigitaldev.com/invest2day/property/191-barkers-rd-kew/
any help please
<?php
$attachment_id = get_field(‘downloads’);
$url = wp_get_attachment_url( $attachment_id );
$title = get_the_title( $attachment_id );
// check if the repeater field has rows of data
if( have_rows(‘downloads’) ):
// loop through the rows of data
while ( have_rows(‘downloads’) ) : the_row();
?>
<!– display a sub field value –>
<?php the_sub_field(‘download1’); ?>
<?php endwhile; else :
// no rows found
endif;
?>
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.