Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #739093

    Hi Kriesi,
    I added this code to functions.php to open external links in new tab. I need this basically for the portfolio. It works perfect but the problem appears when I click on the “load more button”. Then the new items don´t open in new tab.
    I think that the code is already executed and it doesn’t work with the new loaded items.
    Any idea about how can I solve this?

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery("a[href^='http:']").not("[href*='prueba.factoriarte.org']").attr('target','_blank');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');
    #739112

    Hey factoriadearteydesarrollo,

    Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

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