• Hello,

    I noticed that for all of my posts so far: even though I’ve set the hyperlink option to “Open link in new tab,” when I go the live website and click those links, it is opening in the same tab. Could someone take a look at this for me?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • May we see how you set those up ? I don’t see anything set up on any links here.

    Thread Starter pursuitofyappiness

    (@pursuitofyappiness)

    Hi Gyan,

    Thanks for your reply.

    In terms of setting them up, I just did it via the block editor while making my post. I would edit the hyperlinks while checking the box for “Open in new tab.”

    Thanks

    Checked the source, there is something in your scripts that is actually removing the target=”_blank” from your anchor tags.

    I found below code in your source.

    $('a').removeAttr('target');

    If you can find the source of this try removing that line.
    Or if you have a way to add a line of jQuery in admin section, add following lines.
    $('a').attr('target','_blank');

    https://ibb.co/Q90ytDL

    • This reply was modified 3 years, 8 months ago by Gyan Gaurav. Reason: Added screenshot
    Thread Starter pursuitofyappiness

    (@pursuitofyappiness)

    Hi Gyan,

    How do I find the coding for my website? Do I do this in the WordPress dashboard area?

    I just want to make sure I’m doing things correctly the first time, if you could walk me through that process.

    Much appreciated!

    Hi,

    Things changes from theme to theme. Looks like you are using bravada theme. I can’t find their admin demonstration. You should look in theme settings and try finding custom script/js section.
    In that section you can paste the above code. Or share the screenshot with admin settings possibly.

    Thread Starter pursuitofyappiness

    (@pursuitofyappiness)

    Hi Gyan,

    I actually found a WordPress plugin (Open External Links in a New Window) that automatically opens all hyperlinks (excluding internal links within your website) in a new tab.

    Thank you for your help though, I really appreciate you responding to my thread.

    Take care!

    Great, please mark this resolved

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘External links not opening in new tab’ is closed to new replies.