How to share main Navigation in WordPress Network websites
I’m currently involved in a WordPress job that is using the networked features. Takes a bit of getting used to, but a fantastically powerful way to give users creative control over their own WordPress subsites, but at the same time tying them into the parent brand.
In this instance we are creating WordPress subsites using the networked features, but we want those sites to have the main parent site’s navigation system. How do you do this? It’s actually incredibly easy and involves using the switch_to_blog method.
Lets get started…
Just prior to the call to the navigation methods we switched to the ‘parent blog’ which was blog number 1,
<?php switch_to_blog(1); ?>
And then afterwards you switch back to the current blog to process the rest of the page;
<?php restore_current_blog(); ?>