Thanks so much for your help John. I have been struggling to figure this out. Works like a charm! Thanks for the link to the post too.
Shaun.
Hi John,
That is the complete code I have so far, I am not sure what the code would look like in the “<? How to link this image field to an External URL”
section.
`<? Not sure what code needs to go here to link the image field to an External URL
<?php
$image = get_field(‘image’);
if( !empty($image) ): ?>
” alt=”<?php echo $image[‘alt’]; ?>” />
<?php endif; ?>
?>
Thanks,
Shaun.
Hi John,
Thanks for your reply. So, that is what I am struggling with is the code on the front end. Not sure how to wrap the image field in the external URL field????
<? How to link this image field to an External URL
<?php
$image = get_field(‘image’);
if( !empty($image) ): ?>
” alt=”<?php echo $image[‘alt’]; ?>” />
<?php endif; ?>
?>