How to Make WordPress Links Open in New Tabs

By default, links open in your current browser tab. However, the links on your site can easily be updated to open in new tabs instead.

In this post, you’ll learn:

  • How to make links in posts & pages open in new tabs
  • How to make links in menus open in new tabs
  • How to make all external links open in new tabs

The first two will be done with core WordPress features, and the last method can be accomplished with a simple plugin.

Make post links open in new tabs

First, navigate to a post or page where you want to add a link.

In the editor, highlight the text you want to add a link to and press the link icon in the editor.

screenshot of the link editor button being used

A URL input will appear where you can enter a URL. Add a URL and then press the gear icon on the right side of the popup.

the link settings icon

Clicking the gear icon reveals the link settings window where you can further edit the link. In particular, it provides a checkbox where you can choose to open the link in a new tab.

screenshot of the new tab checkbox

Check the box and then press the Update button below to update the link. You can repeat this for any other links in the post/page.

Make menu items open in new tabs

This one is really tricky to find, so not many people know about it.

There’s one prerequisite: you need an existing custom menu. If you’ve never created a menu before, following this help article on creating menus.

Once you have a menu prepared, head to the Menus page in your dashboard (Appearance > Menus). Then look all the way up to the top-right corner to locate the Screen Options tab. Click on it, and you’ll see a few display options revealed including the Link Target option.

the hidden link target menu option

Check the Link Target box and close the Screen Options tab. Next, click the drop-down arrow on a menu item to reveal its settings.

the drop-down button for a menu item

Here you’ll see a new option to open the link in a new tab. This option was previously unavailable until the Link Target box was checked off.

option to open link in a new tab

Check off the new link option, and remember to save your menu afterward to keep your changes.

Make all external links open in new tabs

I tried a few plugins for this, and “Open external links in a new window” was my favorite.

The Open external links in a new window plugin

The External Links plugin was promising too, but despite the good reviews, it didn’t work on my test site. It may be worth trying as a fallback.

This plugin couldn’t be easier to use. It starts working the moment you activate it. There is a simple settings page for turning the functionality on/off for specific links if you need more control.

New link targets added

Hopefully, you’re well on your way to updating your link targets.

In this post, we covered how to open links in new tabs whether they’re in posts, pages, or the menu. Lastly, we covered how to make all external links on the site open in new tabs.

Is there something missing in this tutorial? If you think so or have any questions, post a comment below.

Related Posts

4 Comments

  1. Joe Joe

    This plugin also does not work. “Open external links in a new window”

    • Ben Sibley Ben Sibley

      Hey Joe,

      Sorry to hear that :/ If that plugin also doesn’t work, it’s likely there is a Javascript error on the site. I would either try a different plugin or deactivate your installed plugins to find the one causing the Javascript error.

  2. Bill Blood Bill Blood

    I want to know how to make my posts not open in a new window. I did what you said with the link target box and got the option to open in a new tab. I didn’t check any of them yet all of my posts still open in a new tab.

    • Ben Sibley Ben Sibley

      Hi Bill,

      I’m afraid this can’t be done with HTML. We can use “_blank” as our link target, but it is up to the browser to decide whether this opens in a new tab or window. There is some relatively straightforward Javascript that can be used to open a new window, but there is a chance the window will be treated like a popup and get blocked.

Post a comment

Your email address will not be published. Required fields are marked *