Home › Forums › Add-ons › Repeater Field › PDF Attachment as Link › Reply To: PDF Attachment as Link
Could you please tell me where did you want it to show up?
If it’s on the front end, I believe you can add a new file custom field to the repeater and then add the link to the job text like this:
<?php // check if the repeater field has rows of data if( have_rows('repeater_field_name') ): // loop through the rows of data while ( have_rows('repeater_field_name') ) : the_row(); // display a sub field value $file = get_sub_field('file_sub_field'); if( $file ): ?> <a href="<?php echo $file['url']; ?>"><?php the_sub_field('job_sub_field'); ?></a> <?php endif; endwhile; else : // no rows found endif; ?>
I’m afraid you can’t do it on the backend, though. I’m sorry for the inconvenience.
I 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!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN— Advanced Custom Fields (@wp_acf) March 2, 2023
© 2023 Advanced Custom Fields.