Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #735264

    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!

    #735756

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.