Tagged: 

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

    I submitted this question twice – sorry. I don’t know how to delete one!

    I have added the code in the child functions.php file (as suggested here: https://kriesi.at/support/topic/how-to-masonry-items-open-in-a-new-window/?login_error) but portfolio items won’t open in a new window from the Masonry Grid. Do I need to do anything else?

    Code: function masonry_links () {
    ?>
    <script>
    window.addEventListener(‘DOMContentLoaded’, function() {
    (function ($) {
    $(document).ready (function () {
    var url = new RegExp(location.host);

    $(‘.av-masonry-entry’).each(function () {
    if( ! url.test($(this).attr(‘href’)) ) {
    $(this).attr(‘target’, ‘_blank’);
    }
    });
    });
    }) (jQuery);
    });
    </script>
    <?php
    }
    add_action (‘wp_footer’, ‘masonry_links’);

    #1420638

    Hi ElizabethEnglish,

    No worries, we will just close this thread and proceed with the discussion on your other thread. :)

    Best regards,
    Nikko

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Portfolio items won’t open in a new window from the Masonry Grid.’ is closed to new replies.