How to add a target _blank on a WordPress menu item or other elements

How to add a target _blank on a WordPress menu item

This article will show how to add a target _blank on a WordPress menu item from your dashboard.

The Menus module is one of those wonderful features, but by default, it doesn’t allow to specify some attributes of the menu items, like the “target”.

In my opinion, the WordPress administration area design is not usable (and not 508 compliant) and some buttons and options are difficult to find because they are normally in gray letters over light gray backgrounds. After seeking for around half an hour, I finally found the way to specify the target attribute of a link on the Menus module. I decided to share this because I think it’s something difficult to find but also something very easy to activate:

Step 1: Screen Options.

Go to the “Menus module”, under “Appearance”. Then, click on the “Screen Options” button, located in the top right corner.

How to add a target _blank on a WordPress menu

On the Menus option, click on the Select Options button

Step 2: Enable the Link Target option.

Then, under “Show advanced menu properties”, check the “Link Target” option.

Check the Link Target option

Step 3: Specify the target attribute on the WordPress menu.

On the Menu items options, a new field will be displayed – Open Link in a new tab.

Also, Read How to Increase the Maximum Upload File Size in WordPress


Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/u212091429/domains/mydevhelp.com/public_html/wp-includes/functions.php on line 5420

Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/u212091429/domains/mydevhelp.com/public_html/wp-includes/functions.php on line 5420