Global Menus in multisite

I have 300 domains and thousands of subdomains on a single
multi-site install. The paying bloggers have access to all of them, so
they are shared blogs. The main content area features all the posts
from all the bloggers for any particular domain. All of the content
for all of the blogs is by default public. Any one can come read, but
only paid members can blog. I want the admin to set the top navigation
menus for every site within the multi-site network, but right now, the
navigation menus have to be setup manually for each of the 300
domains. I don’t want to hard code the navigation because it’s very
fluid and changes often. What can I do?

  • Mason

    Hiya alberti,

    I don't know of any solution for global menus like this. Are they all the same theme? Then you could just hardcode the new links in the theme folder each time. That or write a plugin that injects the nav into the theme - that could work with multiple themes even given that the themes were coded with same menu nav structure.

    That's my thought. Anybody else have any experience with this?

    thanks!

  • Mason

    Hiya alberti,

    Well, I'm still not exactly sure on what you're trying to accomplish here, but you could look at your theme's output for menu navigation and then rather than using the php function that creates the dynamic navigation for each site - hardcode the links.

    It's hard to provide a concrete example without knowing more about your theme, but if it looked something like this:

    <div id="nav">
    <?php wp_list_pages(); ?>
    </div>

    You could hardcode your links so that they are the same at an absolute level:

    <div id="nav">
    < ul>
    < li>< a href="http://example.com/about">About Us< /li>
    < li>< a href="http://example.com/contact">Contact Us< /li>
    </ul>
    </div>

    The above code would obviously mean that all blogs will link to the exact same location (as it's an absolute URL)

    Alternatively you could link to the same page relative to that install on a multi-site network by doing this:

    <div id="nav">
    < ul>
    < li>< a href="<?php get_site_url(); ?> /about">About Us</li>
    < li>< a href="<?php get_site_url(); ?> /contact">Contact Us</li>
    </ul>
    </div>

    The above code would link to the same page on each blog (assuming that page exists of course).

    Since you're using the same theme for each blog, hard-coding the links in this way will force each blog to use the links. Hope this helps!

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.