Hi,
i have a gallery with some thumbnails and want to set links to pdf files to open it in a new window.
Is it posible? If, how can i do this?
Thank you for helping!
Hey Luisgasser,
It’s possible but it would affect all masonry gallery:
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');
If you want it to work only on specific pages, please post the link of the page so we can adjust the code. Hope this helps :)
Best regards,
Nikko