-
AuthorPosts
-
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 #343965tags of request corrected. Didn’t know what to use as sepeartor (; or ,)
November 1, 2014 at 4:32 pm #344604Hi!
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,
ElliottNovember 1, 2014 at 5:45 pm #344644Great – 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 #344741Hi!
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!
ElliottNovember 2, 2014 at 1:30 am #344753Hm. 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 #344796Hey!
Elliott’s code is working but it seems you haven’t implemented it correctly.
Please check and try again.
Regards,
ArvishJanuary 2, 2015 at 2:50 am #373988Put 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, 11 months ago by millertimesites. Reason: more details
January 2, 2015 at 6:08 pm #374122Hi!
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!
YigitJanuary 2, 2015 at 8:32 pm #374210worked awesome, thanks a ton.
Jon -
AuthorPosts
- The topic ‘Masonry Gallery – open URL in new tab or window’ is closed to new replies.