Hi Kries team,
I have the Enfold template and I was trying to add the Masonry Gallery on a page, then loading Logo images into the gallery with links to the manufacturer’s site of the respective logo. However, when you click on the link, it will only go to that manufacturers webpage on the existing window you are in. Is there some way I can use the Masonry Gallery, but have it redirect to a new page when opening the Manufacturer’s site? I of course tried putting in some html code where the custom link is being added, but that didn’t seem to work on that field. If you can help, I would appreciate it.
Thanks,
Philip
Hi Philip,
Try adding this at the very end of your theme functions.php file:
function add_custom_script(){
?>
<script>
jQuery(window).load(function(){
jQuery('.av-masonry a').each(function(){
jQuery(this).attr('target', '_blank');
});
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Regards,
Josue