Tagged: , ,

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

    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….!??
    reference: http://de.flymotions.com/unternehmen/


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



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

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

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



    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!



    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; }



    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?



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

    Please check and try again.



    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.


    • This reply was modified 8 years, 11 months ago by millertimesites. Reason: more details


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

    function add_custom_target(){
    jQuery('.av-masonry-container a ').attr('target','_blank');
    add_action('wp_footer', 'add_custom_target');



    worked awesome, thanks a ton.

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.