Tagged: enfold, Masonry Gallery
Hey, Kriesi Support –
Within the masonry gallery element, is there a way to set the “Custom Link” field to open in a new tab?
Thank you!
Hey alextornek,
Can you try adding this code at the bottom of your functions.php:
function masonry_newtab(){
?>
<script>
jQuery(window).load(function(){
jQuery('.av-masonry-container a').attr('target', '_blank');
});
</script>
<?php
}
add_action('wp_footer', 'masonry_newtab');
Hope this helps :)
Best regards,
Nikko
Hi Energy1,
I tried adding the code also but it didn’t save and I get this error in the console:
http://www.catalyst-ir.com/wp-admin/admin-ajax.php 504 (Server timeout)
I think you’ve done it properly but the server timeout prevents it from saving, you can add it via ftp instead.
Best regards,
Nikko
Hi Energy1,
The code we gave should make masonry gallery links open in new tab (I apologize for not having to mention it before).
Adding that option would require a lot of time and outside the scope of our support.
If you need it to be only applicable to certain links, please give us the exact link to the page and which images you want to open in new tab so we can adjust the code we gave.
Best regards,
Nikko
Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)
Best regards,
Vinay