Home › Forums › Add-ons › Repeater Field › Link to External URLs? › Reply To: Link to External URLs?
Hi @elliot,
Thanks for the reply!….Actually, that was my fault – the photographer name doesnt use the repeater…Thanks for noticing that.
Also, I think i need to clarify regarding the URL…I’m actually trying to have the name of the Photographer be a hyperlink to a specified url…Each post may have a different photographer….so, I may have something backwards in how I setup my field and code.
Currently, in the admin for the post – I have the field to type the name of the photographer, but I assume I also need the option to include a URL associated the name.
The field type that I am currently using is “Text”.
Below is an example of the code I am using now, which does make the Photographers name clickable – but, now how do I associate a specific URL?
I left a gap in the code on purpose, coz I assume that is where I fill in the missing code…right?
<p class="image_photographer">Image Courtesy of: <a href="[URL FIELD CODE GOES HERE]; ?>" target="_blank"><?php the_field('image_photographer'); ?></a>
Hopefully, you can see what I did wrong there, and what im trying to do
Thanks!
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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.