[wp-hackers] Shared MultiSite Menus
Dobri
dyordan1 at ramapo.edu
Thu May 30 15:29:11 UTC 2013
If it's this specialized, how about on menu save from any of the four sites you create a raw HTML flat file and dump it on the server? Then on render, just pull that file in. Doesn't really scale obviously but it works for a very specific case like yours, right?
~Dobri
On Thu, 30 May 2013, at 11:16 AM, Jesse Friedman wrote:
> I have a rather unique situation. I have a multisite installation with
> approx 600 sites.
>
> Of these 600 sites, #500, #501, #502, and #503 need to share menu's with
> each other.
>
> Currently the best solution I have found is to use switch_to_blog() to pull
> in the necessary nav menus, on each site. This works just fine, although I
> can't really predict the load this might put on the network, as I know that
> switch_to_blog() is not really the most efficient function.
>
> So if you're on site #501 I'd use switch_to_blog 3 times to get the menus
> from #500, #502, and #503.
>
> All 4 sites use the same exact theme.
>
> Option 2
> I have also considered saving the menus as Site options in site #500. So
> each time a menu is saved in #503, it will also save the raw HTML as a site
> option in #500. This way, I only need to switch_to_blog() once, if I'm not
> on site number #500.
>
> Option 3
> I have also considered saving the nav menus HTML as site options for all
> sites, this way there will never be a switch_to_blog() function on site load
>
> Of course, I will use transients to only run the switch_to_blog() once a
> day.
>
> Does anyone have any better ideas? I don't necessarily need code, but a
> better plan of attack.
>
> --
> thanks
>
> *jesse friedman*
> jes.se.com *
> *
> Book: Web Designers Guide to WordPress -
> http://wdgwp.com/onamazon<http://wdgwp.com/onamazon>
> Twitter: @professor <http://twitter.com/professor>
> Facebook: Like<https://www.facebook.com/pages/Jesse-Friedman/204793299545174>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list