Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #715337

    Hi,
    How can I open the custom link in a new window?

    Thanks in advance

    #715555

    Hi imc-html!

    Try adding this code in functions.php:

    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');

    Let us know if it works :)

    Regards,
    Nikko

    #715795

    Hi Nikko,
    thank you for your quick response.
    I use the portfolio grid, so I changed the class av-masonry-container

    function add_custom_target(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘.av_one_fourth a’).attr(‘target’, ‘_blank’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_target’);

    It works great

    Thank you very much
    Christopph

    #715807

    Hi,

    Glad we could help!
    We really appreciate it if you rate our theme on themeforest, Thank you for using Enfold :)

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.