Hi,
How can I make the links of the masonry element open in a new tab?
Thanks
Hi sasha,
Can you try the solution posted on this thread: https://kriesi.at/support/topic/gallery-images-new-and-not-new-browser-window/#post-1242415
Hope it helps.
Best regards,
Nikko
Thanks Nikko. The suggested solutions didn’t work…
I searched some more and found the needed code here: https://kriesi.at/support/topic/masonry-gallery-open-url-in-new-tab-or-window/#post-374122
function add_custom_target(){
?>
<script>
jQuery(window).load(function(){
jQuery('.av-masonry-container a ').attr('target','_blank');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_target');
This one works!
Hi,
Did you need additional help with this topic or shall we close?
Best regards,
Jordan Shannon
Close please. Thanks
Hi sasha,
We’re glad to hear that :)
Thanks for using Enfold and have a great day!
Best regards,
Nikko