Tagged: , ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #343964

    Hej,
    Is there an easy way to open custom URLs of Masonry Gallery Pics in a new tab / window? (target=’_blank’).
    Cant’t find the option. Have one would bei nice.
    I want to uses the Masonry Gallery instead of Partner/Logo Element due to different sizes and Masonry Gallery looks much better then. Is there any other good reason to use Partner/Logo Element? Logos are nothing else than images….!??
    thanks!
    Felix
    reference: http://de.flymotions.com/unternehmen/

    #343965

    tags of request corrected. Didn’t know what to use as sepeartor (; or ,)

    #344604

    Hi!

    Switch to the Text editor and add this to the bottom.

    <script type = "text/javascript">
    jQuery('.av-masonry-container a').attr('target', '_blank');
    </script>

    If your using the Masonry Gallery then that will have the custom links open in a new window.

    Regards,
    Elliott

    #344644

    Great – did work – thank you.
    Please – one more hint: why is the background color of the gallery grey – even if it’s placed outside a color section to achieve full window width of gallery?
    I’d expected the background color white. How can I get it?
    Thanx in advance!

    #344741

    Hi!

    It’s the CSS for the images. You can change it to white by adding this in Dashboard -> Enfold -> General Styling -> Quick CSS,

    .slide-image { background: transparent !important; }

    Cheers!
    Elliott

    #344753

    Hm. Thanx. But that one didn’t work. Masonry Gallery Background is still grey: http://de.flymotions.com/unternehmen/ (the logos form my customers at the bottom)
    Any other idea?

    #344796

    Hey!

    Elliott’s code is working but it seems you haven’t implemented it correctly.

    Please check and try again.

    Regards,
    Arvish

    #373988

    Put the code in a text editor to let the gallery links open in a new tab, however, ran into an issue.
    Here is the example page I’m having issues with http://62d.14e.myftpupload.com/clients/

    I have a Masonry Gallery inside a color section and the new tab link works sometimes, but it keeps forcing it to 2 columns.
    Below that I have the same Gallery outside of content/color section and the new tab linking doesnt work but the columns are responsive like they should be.
    Below both of them I have a Partner/Logo Element which works okay but isnt cool looking.

    Is there code to make it so you can click on Portfolio item links and have them open in a new tab, that is a missing option as well.

    Thanks
    Jon

    • This reply was modified 9 years, 10 months ago by millertimesites. Reason: more details
    #374122

    Hi!

    Please add following code to Functions.php file in Appearance > Editor

    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');

    Cheers!
    Yigit

    #374210

    worked awesome, thanks a ton.
    Jon

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Masonry Gallery – open URL in new tab or window’ is closed to new replies.