1
votes

I'm trying to figure out how to display a menu that has been created, but without having to assign the menu to a theme location.

From what I can tell, you have to assign a menu to a theme menu location and then wp_nav_menu calls a menu from whatever location you want.

I don't want to have to assign a menu to a theme location. Instead, I want to be able to create a menu and then query it within my theme... regardless of theme location.

I've created a plugin for myself that uses wp_get_nav_menus to list all of the menus I've created... I can then assign any menu to a page/post. Now, I'm stuck trying to figure out how to retrieve that specific menu... again, not menu theme location.

Anyone?

2

2 Answers

1
votes

Paste this code in your theme wherever you want to display

wp_nav_menu( array('menu' => 'menu-name' ));
1
votes

Well, it looks like I found what I need:

http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items

I find it odd that wp_get_nav_menus isn't documented in the Codex.