Opening menu links in new browser windows

Many users will add custom links to their theme menus, to link to social media platforms, other websites they own, etc.

In WordPress, we recommend turning on the Link Targeting property. Doing this will allow you to select which menu links you wish to open in a new tab or browser window. We recommend opening external links in a new window (in other words, when you’re linking to somewhere outside your site), so that users can easily return to your site when they are done viewing the link.

There are two ways to enable Link Targeting in WordPress:


FROM THE MENU PAGE

1. From your WordPress dashboard, navigate to Appearance > Menus.

2. Open the Screen Options tab in the upper right corner of the menu. Under the heading “Show advanced menu properties,” check the box for link target. From now on, you’ll have an option to “open link in new tab” when you add items to your menus!

3. If you wish to change existing menu items to open in a new tab, click the arrow next to the menu item you want to edit to expand the options. You should now see a checkbox to open the link in a new tab. Check the box, and save!


FROM THE MENUS TAB IN THE CUSTOMIZER

1. From your WordPress dashboard, navigate to Appearance > Customize > Menus

2. Click on the gear shift icon, underneath the Publish button.

3. Check off Link Target. That’s it! From now on, you will be able to set menu items to open in a new tab if you wish.

4. If you want to edit existing menu links to force them to open in a new tab, simply select the menu you wish to edit from within the Customizer, click on the item, and check Open link in a new tab. Here’s a short video showing you this entire sequence. Note that while the settings are for our Miramar theme, this same workflow applies to any EmPress theme:


WHEN ALL ELSE FAILS

Don’t want to mess with your menu settings? You can also install  this plugin, which will automatically open any external link (that is, any link that doesn’t have your blog’s domain in the URL) in a new tab!