Home › Forums › Add-ons › Repeater Field › Repeater file field › Reply To: Repeater file field
Hi Daniel,
Thanks for your reply. Yes I’m using a File field (subfield) in my Repeater field.
When I add [‘filename’] it returns ‘h’ as file name?
$rows = get_field('horse_official_documents');
if($rows)
{
foreach($rows as $row)
{
echo '<div><a href="'. $row['horse_official_document'] .'" target="_blank">' . $row['horse_official_document']['filename'] . '</a></div>';
}
}
I want the output to be:
<a href="https://www.breeders.site/wp-content/uploads/2020/01/score-mares-01.jpg">score-mares-01.jpg</a>
What am I missing?
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.