The navigation menu links are the links you display in your website’s menu bar. Managing WordPress menus is easy, its default interface allows you to add menu items from various filters of your website, rearrange them with drag and drop interface, and set their navigation label and title attribute.
However, some advanced options can be enabled from the ‘Screen Options’ tab present in the top right corner of the menu admin screen. In this lesson, you will see how to make some menu links to open in a new tab.
Visit your WordPress admin area dashboard and navigate to Appearance -> Menus page. Now click the ‘Screen Options‘ tab and tick ‘Link Target‘ option visible in the ‘Show advanced menu properties’ section.
This adds a new checkbox ‘ Open link in a new window/tab‘ option on each menu link added to your menu structure. Now all you need to do is tick that option on links that you want to open in a new tab.
Click Save Menu to apply the updates. This will ensure the selected menu links open in a new tab.
How To Open Navigation Menu Links In New Tab (Using Block Editor)?
To open navigation menu links in a new tab in block themes in WordPress, follow these steps:
- Navigate to Appearance -> Themes to use the full site editor.
- Click on the header section, then select the Navigation Block where the menu is located.
- Use the ‘+’ icon to add a link or edit an existing one.
- Toggle the option for ‘Open in new tab’ to ON.
- Save your changes by clicking the ‘Submit‘ button and then ‘Save’ button at the top.
You can also open all external links on your website automatically in a new tab or window with the help of a plugin. You will learn about it in the next lesson.