How to add Target Blank to WordPress Menu Custom Link

The WordPress menu allows the addition of custom links.

It’s a great way to supplement your menu pages with specific additional references. The links may be to social media, business or trade organisations, agents, or other related websites.

I had added custom links to the WordPress menu of a website.

A simple task, but after the links were in place reviewing the menu showed that clicking on one of these links took the visitor to the clicked link. Potential taking the visitor away from the website.

Adding the custom links to a menu I was concerned that the visitor was able to navigate away from the website.

The usual way to correct this is the addition of a target=”_blank” parameter. The links opens in a new tab or window.

Viewing the options on the custom link dialogue there were only the two text box options to complete: title and link url.

Whilst looking at one of the WordPress admin pages if you think that an option is missing it can be a good idea to expand the screen options.

I clicked on the Screen options tab at the top of the page

Together with the other options presented it included a row of checkboxes including:

  • Link Target
  • Title Attribute

Tick the checkbox for Link Target and close the screen options area.

Now revisit the custom link and the option Open link in new tab will be shown. Tick this option and save your menu.

Your added custom menu link with its custom URL and text will now open in a new browser window, rather than taking your website visitor to the new page, leaving the page which they were on.