I’m trying to create a menu implementation with the new wp_nav_menus in an existing menubar the function works fine all but for one issue I’m struggling with which is finding how to access the given menu name supplied by the user.
The wp_nav_menu array is returned within an existing li a structure enabled for drop downs so the top level list anchor element needs to display text, for the moment it’s hard coded but needs to be reflect what the user may have created and named their menu in the dashboard create menus screen.
I have used has_nav_menu(‘my-region-name’) for checks so could use that to check for a specific regions added menu? but after that I drawn a blank and can’t work out how to fetch the given menu name.
Have checked the Codex and run through nav-menu-template.php but can’t figure out a means. Can anyone give me some pointers in the right direction please.
I’ll rephrase the question as the above may have been too verbose and confusing.
Can anyone tell me how to populate an array of ? wp_nav_menu objects specifically the menu name that the user gives a new menu they create in admin.
I need to try and access whatever name may have been given to a menu in order that it can be used to provide a text string for an anchor element.
The function requiring this is running as a plugin.
Obliged for any help that can be provided on this fairly new aspect of WP
- The topic ‘wp_nav_menu’ is closed to new replies.