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!
2 Comments
More posts from themightymo.com
We Now Offer Search Engine Optimization!
We have just teamed up with one of the web’s finest search engine optimization gurus, Greg Cryns, and will now be offering his services to you, our customers! For you, our customer, this means that we now have added expertise in driving targeted traffic to your website. Greg has over a decade worth of search…
Adobe CS4 Flash MN Presentation at FlashMN
Below are my notes from tonight’s FlashMN meeting starring Dustin Tauer. The presentation focused on the new features of Adobe Creative Suite 4. Illustrator CS4 Can create multiple art boards. So, if I wanted to use artwork for the front and back of t-shirt, I would create 2 art boards (up to 100). There are…
SPECIAL OFFER: $99 WordPress Blog!
For the Month of July only! Get your very own WordPress blog or static website – $99! This includes: – Domain registration for one year – Hosting for one year – Installation of your WordPress blog – Installation of SEO plugin, Akismet spam prevention, and up to 5 additional plug-ins of your choosing – Online…
Wow. That function could open up a number of possibilities for cross blog sharing. Good tool for the toolbox.
I was actually trying to find a way to do that on an install recently (without hard coding the page urls)
Thanks
@Carl – Glad to be of service. 🙂