WP 3.0 custom menu in multisite
My blog is a multisite with each section of the site having different colours and header images. The top menu above the header image is created with the WP custom menu.
What I want to achieve is for this menu to be constant across all my subsite so that I don't have to recreate each menu manually each time I update something or add a new subsite. Apparently it can be done by adding two lines of code immediately before and immediately after the nav bar code in header.php. I found this in the WordPress forum : just before the nav bar code put <?php switch_to_blog(1); ?> right after the navbar code put <?php restore_current_blog(); ?> then it will always show the pages from Blog #1 and it worked for the person who asked the question with the theme they were using. I am not sure where to place this code in Ata theme files as header.php calls to the functions in the new wp menu file to display the menu. I have tried inserting this code in several different places to no avail. A couple of those attempts "broke" my blog lol. Does anyone know how to implement this ? Maybe it's a good one for Flynn to add to the wish list for the next upgrade as more and more users(and clients) are wanting to implement similar features with multisite. |
you could try adding them before and after line 16 of bfa_header_config.php
no guarantees - I haven't tried it and I don't see why on a multi site you would want the other sites to have the first sites menu. That means that if you create a page in site 2, there will not be a link to in. But, I'm sure you have your reasons, so give it a try. |
I already tried that. That's what broke the site :). If you have a look at the site(the link is in my profile), you will understand why I want the subsites to have the same top menu. It is a custom menu that is the main nav for the site.
The second menu shows the categories(not a custom menu) of each subsite and any other nav links that I need I put in the sidebar using either tags or the blogroll. A bit like other major sites you see where the main nav is at the top. |
All times are GMT -6. The time now is 09:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.