WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently using wordpress menu like this ...



But what if want is to add a specific link to a menu item. Other than a wordpress page. Say an external link. What do i do?

share|improve this question
up vote 2 down vote accepted

You're _doing_it_wrong(). When you call wp_nav_menu(), you should be referencing theme_location, not menu.

The way the custom navigation menu functionality is intended to work:

  1. The Theme registers locations for navigation menus to appear, via register_nav_menus( array( 'location_slug' => 'Location Name' ).
  2. Then the Theme instructs WordPress where to output those menus, via wp_nav_menu( array( 'theme_location' => 'location_slug' ) ).
  3. The user defines the menu itself, via the UI at Dashboard -> Appearance -> Menus
  4. Then the user assigns a defined menu to the Theme-registered locations, via that same UI.

So, by calling menu instead of theme_location in your wp_nav_menu() call, you prevent the user from assigning a menu to that location. Very likely what's happening is that the user hasn't defined a menu with the name you're calling via the menu argument, and so WordPress is simply falling back to the default wp_page_menu() output.

Once you correct this issue, then you can define a menu with whatever links in it that you want, and then assign that menu to the appropriate location.

share|improve this answer

Adding links to a menu is done from the Admin area. You will find the menu editor under Appearance -> Menus.

Additional instructions can be found on the WordPress codex.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.