Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1444732

    Hello,

    Is there any possibility to navigate to a different external website (new tab) on portfolio item click instead of opening the portfolio item?

    Thanks,
    Androklis

    #1444750

    open that single portfolio – there is an option to show “Additional Portfolio Settings”

    if you like to open all external links in a new tab/window – put this to your child-theme functions.php

    function open_external_links_in_newtab(){
    ?>
    <script type="text/javascript">
    (function($) {
      var url = window.location.origin;
      $('a').not('a[href*="'+url+'"], a[href*="mailto:"], a[href*="#"], a[href*="tel:"], a[href*="javascript:;"] ').attr({
        'target':'_blank',
        'rel': 'nofollow noreferrer',
      })
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'open_external_links_in_newtab');
    #1444758

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

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