Output primary nav with wp_nav_menu()
-
I need to output the primary menu for a plugin I’m working on and I was able to output the menu with:
echo wp_nav_menu();
But that outputs whichever menu is alphabetically saved first. The format of the output isn’t the issue here like most people using wp_nav_menu() but the ability to make it output which menu is selected by the user as the primary. What argument would I pass through? I’ve tried things like this, with no luck:
echo wp_nav_menu(array('menu' => 'primary');
In the end it is a menu that is in a hidden div that I use the content of for a javascript function.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Output primary nav with wp_nav_menu()’ is closed to new replies.