I am working on my first serious WordPress MU installation in a couple of years, and I came across an interesting question: How do I use the main home page navigation across all blogs? Basically, I need the main navigation to be the same on every blog.
After some research, I came upon this discussion thread on the WordPress forums. In the thread, you will see all sorts of different solutions proposed from plugins to hooks. The simplest solution that I found is to include the following in your sub-blog’s “header.php” file:
<?php switch_to_blog(1); ?> <?php wp_list_pages('title_li='); ?> <?php restore_current_blog(); ?>
This code temporarily switches back to the main blog’s information, pulls the main navigation, then switches back to the current blog. Pretty nifty!
More posts from themightymo.com
This morning, I got curious about the competitiveness of a specific keyword in the Google Map (a.k.a. “Local SEO”). The Google map is this strange beast that I am particularly-curious about, because almost 100% of my customers live within a 10-mile bike ride of my house…and I’d like to have more customers so… The keyword…
Rob says WP Multisite should be put out to pasture – I 100% disagree.
I recorded a screencast today of me sharing my live “how to” process for creating a new website. The video is about an hour long, and there were a few small things I wanted to blur on the screen (serial numbers for software). I was surprised that Youtube now has a “blur” effect available after…