Need your link to open in a new tab?
By default, links added to posts (and menu items) open in the same 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.
First, navigate to a post or page where you’d like 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 click the downward arrow on the right side.
This will reveal a simple switch you can click to make the link open in a new tab.
Once you enable the new tab option, update your post to save the change and your link will now open in a new tab.
A similar process can be used for menu items.
This one is really tricky to find, so not many people know about it.
I made a video tutorial for this step that you may find easier to follow along with:
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.
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.
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.