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

    Hi, how can I make all the custom links i’m using in a masonry gallery open in a new tab?

    #1035762

    Hey DROR,

    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

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