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.
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.
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.
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.
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.
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.
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 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.