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

    Hi, I have a blog overview page: https://gesundmitschlaf.com/produkte/ – and I want that there opens a new window if user click on an article.
    How can I make this?
    Best regards Dietmar

    #1112650

    Hey pumpmakers,
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_blank_script(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $("#top.page-id-13358 .post-entry a").attr('target', '_blank');
     });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_blank_script');

    Best regards,
    Mike

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