In very old version of WordPress, you couldn’t add the ability to allow a link to open in a new window. However, that is no longer the case. You can add that whether you’re using the visual editor or the text editor, when you make a link open in a new window.
Here’s how to do that.
How To Make A Link Open In A New Window in WordPress
The easy way
To make a link open in a new window, you simply click on the link icon in your post or page content editor. When you do so in visual editor, you can highlight a word and click the link icon in the toolbar above the content editor. A little bar will show up like below.
Add your link in and then to make that link open in the new window, there’s a little sprocket icon in that bar for settings. Click on that, and you’ll get the following window to open.
Check the box that says Open link in a new tab. Most browsers will open the link in a tab, instead of an entirely separate window.
The code way
If you like to use code or are curious, you can make a link open in a new window, in WordPress, or any other website by using the following:
<a href="YOURURLLINKHERE" target="_blank">YOURLINKTITLEHERE</a>
(Note: Add your own website link or URL to the YOURURLLINKHERE part of the code, and the title of your link, instead of YOURLINKTITLEHERE.
The part that makes the link open in a new window is the target=”_blank”.
Easy peasy right?
Well, this isn’t the only place that most WordPress users may want to try making a link open in a new window. Widgets are also where you can add links. You can either use a text widget and code your own, or make a custom menu.
Make Custom Menu link open in a new window
To make a custom menu, you’ll need to go to Appearance > Menus, in your WordPress admin. By default, you can’t see the option to open the link in a new tab or window, so you will have to enable it by selecting the option in the screen options tab.
Once you have, create your custom menu, and add a link. You can click on the link that you added, and when it expands, you should see a checkbox to allow you to open that link in a new tab. Check that box, and then save the menu.
And that’s how you can get a a custom menu item link to open in a new window, in WordPress.
Hopefully that helps, if you’ve been trying to figure that out.