By default a menu link in WordPress Menus opens in same window.What if you want a page ,category or other post type link in a menus open is new window/tab ?
It is very easy to set a hyperlink to open in new tab/window in HTML.
<a href=“http://wpgyan.com” target=“_blank”>Link Text</a>
In WordPress by applying some conditional PHP codes in menu it can be set to open to new window/tab.
But In this post I am going to show you how to do this without writing a single line of code.
Here are steps to do so..
1. Go to Menus section of WordPress Admin
Appearance => Menus
2. Create a menus and add menu items
3. Enable advanced menu properties.
In menu section at the top under admin toolbar you can see a a tab called Screen Options. Once clicked you can see a tab opened like this.
Select “Link Target” box under Show Advanced menu properties.
4. Enable Menu Open in New Tab/Window
Select Open link in a new window/tab box and save menu.
Now menu item will open in new Window ?