[Support request] How to open link in new tab the list of post?

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support How to open link in new tab the list of post?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #15203
    Maria Rowena
    Participant

    Good morning, I am wondering if it’s possible for the list of post to open link in new tab? I am really newbie in WordPress. Hope you can help me. Thanks a lot. 🙂

    #15219
    Tom
    Keymaster

    Hi there,

    As of right now you would need javascript to do this, unfortunately.

    Something like this:

    <script>
        jQuery( document ).ready( function( $ ) {
            $('.wp-show-posts-entry-title a').attr('target','_blank');
        } );
    </script>
    #15238
    Maria Rowena
    Participant

    I’m sorry Tom, I’m not good at using coding script. Where should I place this? I also use premium GeneratePress theme can I use the hook element there?

    #15280
    Tom
    Keymaster

    Since you’re using GP Premium, you can add a Hook Element add the code to the wp_footer hook 🙂

    #15515
    Maria Rowena
    Participant

    Thank you much Tom! This works well! More power to you and to your team!

    #15545
    Tom
    Keymaster

    Glad I could help 🙂

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