Tagged: custom link, Masonry Gallery, new tab
Hi all :)
I’m trying to make it such that when you click on the images in my masonry gallery, the custom link opens in a new tab.
I see that there are countless forum entries about this, but somehow none of the solutions work when I try them. I’m under some time pressure, so would really appreciate a quick solution!
I’ve left my login details so that you can log in and do the fix yourself if possible (that would help me a lot as it would save me precious time).
The page in question is my Timeline page, and the element in question is a Masonry gallery.
Thanks!
Chris
Hey sheilaregan,
Here is the code you can put in your funtions.php
function add_custom_script(){
?>
<script>
(function($){
$(window).load(function() {
$('#av-masonry-1 .av-masonry-entry').attr('target', '_blank');
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
If you need further assistance please let us know.
Best regards,
Victoria
Thank You Victoria!
Sorry for my late reply.
Hi,
Did you need additional help with this topic or shall we close?
Best regards,
Jordan Shannon
Yes you can close this thread.
Hi Chris,
We’re glad to hear that :)
Thanks for using Enfold and have a great day!
Best regards,
Nikko