I’m using the Content Element “Icon” in ALB and there is an option to assign a link to the font icon. But if you add a caption, there is no method to make that caption be linked to the same URL as the font icon. Any ideas how I could do this?
Thank you!
Hey newpappa,
Thank you for using Enfold.
Please add this code in the functions.php file.
add_action('wp_footer', 'ava_custom_script');
function ava_custom_script(){
?>
<script type="text/javascript">
(function($) {
function a() {
$('.av_icon_caption').on('click', function() {
var link = $(this).prev('a').attr('href');
window.location.href = link;
})
}
a();
})(jQuery);
</script>
<?php
}
And this code in the Quick CSS field.
.av_icon_caption {
cursor: pointer;
}
Best regards,
Ismael
Beautiful! Thank you so much!
Hi,
Glad we could help!
We really appreciate it if you rate our theme on themeforest https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)
Best regards,
Vinay