Home › Forums › Add-ons › Repeater Field › PDF Attachment as Link › Reply To: PDF Attachment as Link
I’m not sure which one is the file custom field, so forgive me if I’m wrong (please keep in mind that you need to create a new file custom field in your repeater field). If the file custom field is ‘ort’, you need to do it like this:
// Ort aus Feld laden $ort = get_sub_field('ort'); //Here goes your Code? if ( $ort ): ?> <a href="<?php echo $ort['url']; ?>"><?php the_sub_field('bezeichnung'); ?></a> <? endif;
Also, you need to set the return value of your file custom field to “File Array”. I’ve attached a screenshot for your reference.
Hope this helps 🙂
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.