How do I use the same navigation menu (the main admin site menu) across all new multisites created? I am using the twentytwelve theme.
Was able to do this in WordPress 2.8, but can’t figure out how to do this in 3.4.2 with the twentytwelve theme. Right now, my admin has 5 nav links. If I create a new site it has a home and a sample page navigation item. I want the new site to have the same 5 links as the admin (main blog) has.
Thanks in advance.
Thank you again for your quick response. So, like I have don’t before and used code to do this…the only way is to use the suggested plugin? Also, how would I customize the side bar items for all network sites. Would that work the same as before with code or use a plugin?
Sidebar items would only show:
Thank you again!
I’m using the same plugin to share menu items across multiple sites. It works pretty well once you have it configured, and is only 30 lines of code. You could write your own but that’s a pretty elegant solution.
The thing that Ron doesn’t mention on his page (because maybe it’s supposed to be obvious) is that you need to install it in the plugins directory, and then network activate it so that it’s automatically turned on for all sites.
If you want to use the same sidebar widgets across multiple sites (and not give users the option to change them), just add them to the sidebar in your child theme.
Thank you both. I did not know if I created a mu-plugins folder that would work too. I remeber haveing this folder in the older installs.
I did install the plugin into the plugins folder and activated it network wide. But, don’t see the menu on the multi sites…just on the main admin site. Am I leaving something out?
Sub Site Requirements
Each of the sub sites must:
be using a theme that registers WP nav menus.
have at least one menu with one or more menu items. The wp_nav_menu() function exits early without displaying a menu if it does not find a menu with menu items.
have a nav menu assigned to the specified slot. It can be an empty menu. The reason for this is the same as the previous limitation.
Main Site Implementation
Create your network menu in the main site.
Assign it to the chosen menu slot.
Populate your chosen menu on the main site.
Load the front end of the main site.
Thanks, Mika! I followed those directions, but still not seeing the menu site wide. It’s probably because I don’t understand the new menuing system very well. I created a menu on the Admin site named “main menu” and added items to the menu bar. But, after enabling the plugin the other site (there will be many more sites) does not show it. It only shows “Home” and “Sample Page” on the multisite. These sites will be for instructors and we are trying to eliminate as many steps as possible for them when they create their own site. I will keep trying.
In the dropdown for the admin blow there is a blank item I can select (I am guessing it’s the default and the main menu I created). Do I need to change in the plugin file slot=1 to slot=2?
You should network enable the plugin, not per-site.
Does your subsite have a menu? It says “have at least one menu with one or more menu items.”
I found that I had to save the menus several times on the subsites in order to have it work – so once i created the main menu in the default site, I then created a menu with a single item (“Placeholder”) and added it to the first menu slot in the theme. Save the menu, save the fact that you’re adding it to the menu slot, then view the subsite. you might have to repeat that process a couple of times.
The menu on the sub-site is updated w/ the site-wide menu when you save the menu slot assignment in the sub-site – so it’s important to do that AFTER you’ve set up the main menu.
Got the plugin to work. Since the new site had a menu of “home” and “Sample Page” I thought there was one created already. When I logged in to the multisite there were no menus setup. So, setup a menu called Placeholder like you suggested and selected that menu and click add. The admin menu now shows on all multisite.
So, this is great, but it requires our users to go in and create a menu on their site. Is there a way to have this automatic. I know in WordPress 2.8 MU, I was able to use code in the template and display one menu across all multisites. Also, I was able to remove the home button on the Admin blog and include it on all multisite pages.
Is there no way to do this in WordPress 3.0 +? Sorry if this makes no sense.
The main reason we don’t want each user setting up a “dummy” menu is all the questions on how do I do this. Also, we are going to have 100’s of mutlisites using the same Admin menu.
Are your sites going to use the same theme?
If so, you could write the code into that theme’s default menu. I’m looking in more detail at the plugin as I’m trying to do something similar.
does this: http://wpmututorials.com/plugins/networkwide-menu/
also handle per blog urls? What i means if 1 menu item has link blog1.example.com/about in Blog1
then same menu item name would have its own url blog2.example.com/about in Blog2 ?
I suspect it could.
If you made the menu URL /about instead of http://domain.com/about …
@ancawonka – Did you ever figure out how to hard code this into your theme? I am trying to get this plugin to work but the menu does not show on my subsites. And I don’t want to have to go into each subsite that gets created and make a blank menu.
@myladeybugg – Assuming you’re working in the PHP code for you theme…
If you’re using the same theme on all your sites you can just do a switch_to_blog(1) before you display the menu in your theme. That will then show the menus from your main site instead of your sub site, and you don’t have to create any menus there at all. Make sure to restore_current_blog() once you’re done showing the menu.
- The topic ‘Same nav menu across all sites’ is closed to new replies.