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
Today I had an issue where I needed to merge two folders, each of which contained many sub- and sub-sub folders that had lots of images. After a lot of trial-and-error and some Googling, I found the best solution is to use the “ditto” command in Terminal like this: That’s it! Hat tip to AppleInsider.
I wasted some time today to bring you (dum dum duuuuum!): Some Surprising Trends in Website Development!
I was recently asked to look into creating some secure http headers as well as forcing a website to load over TLS1.2+. Below are my “how to” instructions for updating these settings within WordPress and Cloudflare. Install & Configure the Cloudflare WordPress plugin. Make sure an SSL Certificate is installed on your host for your…