About a year and a half ago I released the Network Wide Menu. Tonight, I made the network wide menu available on github.
When I released it there were quite a few people hoping that it added/output a new menu on the sub sites. I’ve written a bit of code that allows you to do that. What needs to be done to use the NWM for a new menu is
- Register a new menu across the network
- Make sure that menu is registered before the regular menus are registered on the sites. This ensures that the new global menu is the first menu slot on all sites.
- Hide the global menu admin on the sub sites so users do not attempt to populate it with items that will never be shown
- Add the menu to the themes across the network
You can accomplish the first 3 items with the following:
The best place to have that code is in a small plugin in the mu-plugins folder. The earlier this code executes the better.
Now all you need to do is add the menu output to your theme and style it appropriately in each theme:


Glad to see you back here and posting Ron:)
Ron is back! woot! That’s for the post, informative. I will keep it in mind if I ever need a network wide menu. Keep being awesome Ron.
Hi Ron,
Does this code allow for translated menu items as well? I used your Network Wide Menu. Now that I’m translating my website I don’t find my subsite menu items being translated, only the main site.
Thanks
Caspar
How are you translating the menu items on your main site?
They’re translated through qtranslate’s shortcodes [:en}translated text.
I’ve never used qtranslate but at a quess you would probably have to reproduce the translation settings on all the sub sites. NWM caches the menu items (the rows from the DB) not the rendered menu. Caching the rendered menu would only work if the same theme was used across the network.
OK I see. That would make NWM pretty useless for this purpose I guess. Thanks for clarifying this.
Hi Ron,
I have this plugin active and working on a network of 125 sites and I have a problem. I need to deactivate it for a couple sites but don’t want to network deactivate and have to reactivate for all the sites that need it. Is there a way to just disable for a few blogs so they can have custom menus? Happy to compensate, please let me know when you can, thank you.
The easy way to do that on the sites where you do not want the global menu is register another menu (one that you’re not going to use) first before the theme menus are registered.