Associate nav menus with particular menu locations in a theme
|Reported by:||ryan||Owned by:||nacin|
|Cc:||dkikizas@…, Ken@…, aaron@…|
Description (last modified by ryan)
There is currently no way to associate a particular menu with a given call to wp_nav_menu() in a theme. Themes cannot call wp_nav_menu() multiple times and have sane assignment of menus without hard coding particular menu names/ids/slugs (which is not portable across themes and languages).
This can be solved by allowing themes to register how many menus they use and give those menus a handle. A dropdown in the menus admin would show these handles and allow associating a menu with a given handle. Upon switching themes this association would be cleared, although a set of standard slot names could be used and preserved when switching themes (Main, Secondary, ...). Registering "slots" decouples assignment from menu naming, allowing users to name their menus as they see fit in any language instead of being tied to hard-coded strings coming from the theme.
Change History (52)
- Summary changed from Associate nav menus with particular menu "slots" in a theme to Associate nav menus with particular menu locations in a theme