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

How to get nav menu list through menu name in WordPress

I'm using this code by this code but showing all pages not working with custom nav menu name

<?php wp_page_menu('sort_column=ID&amp;sort_order=desc;'); ?>
share|improve this question

I think you're looking for the wp_nav_menu() function, which deals with the navigation menus that you create in the WordPress admin (Appearance > Menus)

You can call it like this:

<?php wp_nav_menu( 'menu' => 'Header Menu' ); ?>

Where Header Menu is the name of the menu you want to print. There are other parameters available.

share|improve this answer
Did my solution work for you, @javeednizar? – shea Dec 18 '12 at 7:06

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.