Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #957216

    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!

    #957965

    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

    #963357
    This reply has been marked as private.
    #963936
    This reply has been marked as private.
    #964027

    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

    #964481
    This reply has been marked as private.
    #965321

    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

    #965511
    This reply has been marked as private.
    #965789

    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Masonry Gallery Custom Links Open in New Tab’ is closed to new replies.