[wp-hackers] nav menus: theme locations vs. individual menus
wp at andrewnacin.com
Sun Aug 1 11:53:06 UTC 2010
On Sun, Aug 1, 2010 at 7:37 AM, Davit Barbakadze <jayarjo at gmail.com> wrote:
> Trying out this new feature finally. However there's something I don't
> quite understand. What's the point of so called Theme Locations?
> Initially I thought that I can create couple of theme locations, like
> footer and header and then assign multiple individual menus to each
> one. Now it looks like it is one to one assignment - one menu goes to
> one theme location (do I misinterpret something here?). But if it's
> one to one then what's the point of having an extra level of
It's not an extra level of granularity; it's a requirement for the
workflow. Say a theme has spots for two menus. And the user wants to create
three menus. Maybe one isn't used, or maybe it is used as a widget. Which
menu goes where? What if I wanted the same menu in both the header and
We realized this after a bit of testing and experimenting with how themes
were going to use menus. Thus, we forced themes to register menu locations.
Then the user can pair menus with the location. Each location can have zero
or one menus, though menus can be used over and over.
Related ticket would be -- http://core.trac.wordpress.org/ticket/13378. The
ticket's description further describes the problem, and you can see how our
solution was developed by reading through the comments and commits.
More information about the wp-hackers