Hi
Is there a way, when giving an image in the masonry gallery a custom link, to open it in a new tab rather than the same one?
Cheers
Hi newsplash!
Thank you for using Enfold.
Yes, this is possible. Add this on Quick CSS:
add_filter('wp_footer', 'avf_gallery_attr', 10);
function avf_gallery_attr() { ?>
<script>
(function($){
$(window).load(function(){
$(".av-masonry-item-with-image").each(function() {
$(this).attr("target", "_blank");
})
});
})(jQuery);
</script>
<?php
}
Regards,
Ismael
Didn’t work in Quick css but added it to functions.php and worked perfectly. Thanks