Jeradin / acf-website-field

Advanced Custom Fields add-on for Website URLs, allows for website URL, title and a checkbox to open externally or internally
59 stars 14 forks source link

External link not working when placed on images #20

Closed acr523 closed 9 years ago

acr523 commented 10 years ago

I'm trying to create a hyperlink on images and while the link will come through, it is not on the image but rather creates it's own div behind the image. When going into developer tools, the code displays as an anchor tag and then the image rather than the anchor wrapped around the image. I can't seem to find any reason as to why this is happening. Any ideas?

Thanks!

jmslbam commented 10 years ago

Have you checked the "return as Array" options and call

$link = get_field('acf_link_key');
$link = $link['url];

?

Jeradin commented 9 years ago

Thanks for answering this jmslbam