Home › Forums › Add-ons › Gallery Field › Use files in Gallery field › Reply To: Use files in Gallery field
Hi John,
Here is my application:
<?php $files = get_field('files');
foreach( $files as $file ): ?>
<li>
<a href="<?php echo $file['url']; ?>">
<?php echo $file['title']; ?>
</a>
</li>
<?php endforeach; ?>
It works (see attachments), but I don’t know if it will eventually produce errors afterwards.
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.