Open WordPress Custom Menu Link in New Window or Tab

WordPress added excellent menu management feature using wp_nav_menu() function. Best feature introduced inside menu management was introduction of custom links using which you can add custom links to your website’s navigation section. So using this feature you can add any link to your navigation.

When you add custom links to your navigation you want option to set target to open link in a new window or tab. By default this feature is disabled under screen option you have to enable this option to set target attribute to your navigation links.

Open links in new window wp_nav_menu()

First go to Appearance > Menu, and click on screen options in the top right corner. Then check the Link Target option.
wp_nav_menu_open_in_window

After you enable link target option from screen options settings you will find dropdown added to each menu item to set target.
new_window_wp_menu

Leave a Reply

Your email address will not be published. Required fields are marked *

One Comment

  1. Eldridge Parrill says:

    Its excellent as your other blog posts : D, thankyou for putting up.