Javascript required
Skip to content Skip to sidebar Skip to footer

Enold Theme Gallery Pictures Opening in Different Window

October 31, 2014 at 12:49 pm #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/

October 31, 2014 at 12:50 pm #343965

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

November 1, 2014 at 4:32 pm #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

November 1, 2014 at 5:45 pm #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!

November 2, 2014 at 12:46 am #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

November 2, 2014 at 1:30 am #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?

November 2, 2014 at 5:39 am #344796

Hey!

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

Please check and try again.

Regards,
Arvish

January 2, 2015 at 2:50 am #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 6 years, 10 months ago by  millertimesites. Reason: more details

January 2, 2015 at 6:08 pm #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

January 2, 2015 at 8:32 pm #374210

worked awesome, thanks a ton.
Jon

Enold Theme Gallery Pictures Opening in Different Window

Source: https://kriesi.at/support/topic/masonry-gallery-open-url-in-new-tab-or-window/