How do I make WordPress menu pages have target=_blank
November 9, 2012
WordPress menus are pretty bland out of the box. At first glance, links can go to:
- Categories
- Pages
- Custom links
Also, at first glance, a menu link has three elements:
- URL
- Navigation label (The text displayed in the anchor)
- Title attribute
However, the built in functionality also adds the ability to set four other options:
- Link target
- CSS Classes
- Link Relationship (XFN)
- Description
To set the link target, in the WordPress menu editor (/wp-admin/nav-menus.php), click screen options in the top right and check the link target checkbox. The option to open a link in a new window/tab will now appear in each link’s options.