The following steps detail how to make a menu item in WordPress open in a new window, that is the links have the target=’_blank’ attribute.
This is done by adding additional screen options to the menu editor screen.
- In the WordPress administration (wp-admin) open ‘Appearance’ -> ‘Menus’
- At the top right of the window, click on ‘Screen Options’
- Under ‘Show advanced menu properties’ place a tick next to ‘Link Target’
- The menu items will now have an additional property called ‘Open link in a new window/tab’
- Place a tick for the menu items you want to open in a new window.
- Click ‘Save Menu’ to save the changes.
- The menu items will now have the target=’_blank’ attribute, making them open in a new window.