How to have exactly the same navigation, the same themes, and yet different backgrounds for three blogs on the same website?
January 30, 2009 1:56 PM   Subscribe

I'd like to have a wordpress website with basically three sections, each blogs. Each must have the same layout, same theme, same navigation, but the background image must be different for each blog. Also, I'd like each blog to have links to each of the others. So, the navigation bar at the top of every page would have the following: home | about | blog1 | blog2 | blog 3 | contact. Can wordpress cover it, and if so, how?

Like the person in this topic, I like what's going on at The Pioneer Woman. Several blogs on one site.

I have also looked at the advice on how to copy it. First of all, I don't think categories are going to work for me, for on each blog, although I'd like to use the same theme, I'd like them to have different background images.

As for Wordpress Mu, I'm not sure even IT allows me to do what I'm looking for, or whether there's a quick fix. And if it does what I'm looking for, is it as easy to install as Wordpress?

Finally, I'm not proficient with php, and often get lost when reading the explanations of how to do things. However, I'm persevering, and will try to follow whatever you guys write.

I have made a diagram of my preferred architecture here:

Essentially I'd like the navigation bar to show this:
Home | About | Billiards | Writing | Street Performance | Contact

With the Billiards, Writing, and Street Performance buttons scrolling down to offer "Blog," "Media," etc for their separate sections. The Home, About, and Contact Us pages would be regular pages (not blogs) which have the same background, but not the same background as the blogs. Make sense?

Thanks for your time,

PS, I have been struggling with Joomla for @#$%ing ages, and can't get the hang of it. As I said, I'm not too good with complicated computer stuff. Should have listened in school...
posted by omnigut to Computers & Internet (12 answers total)
You might find a useful jumping off point at the Wordpress Codex.
posted by Solomon at 2:17 PM on January 30, 2009

The Wordpress CMS can't handle multiple blogs under one installation. You have to install 1 instance of wordpress for each blog.

However, what you could easily do is install 3 installations of wordpress in one website. And then copy the themes to each install. You can then modify the header in each wordpress install to either link to one php file or just copy and paste the code of a standard header to each Wordpress.

And the menu you're asking for isn't difficult at all. It's merely some CSS/javascript code in an unordered list.

This isn't difficult but it can appear daunting. How good is your css/javascript/html?
posted by Stynxno at 2:19 PM on January 30, 2009 [1 favorite]

There are multiple ways Wordpress can do this, but they probably all involve someone writing a bit of custom php.

Are all these blogs going to be written by you? If so, i would contend you do not need three distinct blogs at all- you need one blog, where you classify posts into three different categories. From there it's fairly easy to write pages that display only posts from category x, y or z.
posted by drjimmy11 at 2:19 PM on January 30, 2009

Thanks, yeah, and I just took another look at it. Does anyone have any experience with Mu, Lyceum, WP Hive, or Virtual Multiblog? WP Hive seems promising, but I don't want to go down yet another wrong path
posted by omnigut at 2:22 PM on January 30, 2009

Stynxno; I have three installations of wordpress, as you describe. I know about the terms "ul" and "li," and that's about as far as that goes. Haven't ever looked at Javascript. However, if it's as easy as you say, I'm absolutely willing to try. Any ideas which direction I should go in to find out how easy/difficult it is?

Drjimmy: Thanks for the advice, but the differing backgrounds is fairly important (until I give up), so I'm not sure categories will work for me
posted by omnigut at 2:26 PM on January 30, 2009

BTW, PionnerWomen is using WordPress and, from what I can see from their source code, they are using the "multiple WordPress installations on the same server" method.

omnigut: "Drjimmy: Thanks for the advice, but the differing backgrounds is fairly important (until I give up), so I'm not sure categories will work for me"

Category templates allow you to use whatever background you want, just change the css class used for each one.
posted by Memo at 2:31 PM on January 30, 2009

I think you could fake multiple blogs if you really wanted to by customizing sections by author, but that's a kludge. I agree that three installs, under is the way to go. You might even want to install another copy at for administrative stuff, "about us" pages, etc.

You'll need to hard-code a few links in your templates and set up your categories the same in advance, but that's no big deal.

Also, regardless of whether you do it all under one install, you can use different backgrounds for different categories. In fact, I think there are a few ways you could skin that cat.
posted by adamrice at 2:31 PM on January 30, 2009

If anyone wants to walk me through the skinning process, please send me a mefi.
posted by omnigut at 3:12 PM on January 30, 2009

Thank you Memo, I'll give that a go
posted by omnigut at 4:02 PM on January 30, 2009

I don't think that there is any real reason to have so many installs (why make it so you have to update a bunch of different installs each time?), when you can do it by using Category Templates and custom Pages Templates. Here is how I would do it:

For the Home/About/Contact pages, use your theme and its default Pages Template. The three sections/categories would each have it's own Pages Template and its own Category Template*. The Pages templates would be used in for non-blog content, and the Category templates for the blog content. While this way would make your theme folder a bit larger, it seems, to me anyway, much preferable to the multiple install route.

Do you have a theme that you are planning on using as a basis for your site? It would be easier to say step-by-step how to go about doing it, if we knew what files were already included in the theme.

*For example, the Writing Category would have its own special Pages Template, where the only difference from the default Pages template would be that it's using the Writing background picture. Any new pages you add to this section, make it use the Writing Page Template. This section would also have its own Category Template where posts assigned to Writing would appear in a blog format.
posted by gemmy at 4:06 PM on January 30, 2009

You can run more than one blog from WordPress. The key is to change wp-config.php with some custom PHP code that points WordPress to different databases. (This is the same strategy that Solomon and the Codex uses, but the Codex recommends a more complicated plan where you copy and paste multiple wp-config.phps.)

Basically, you can create a database for each blog: call them db_blog1, db_blog2, db_blog3. And choose three different URLs for them:, /blog2, and /blog3.

You can install WordPress normally to, for example, a master-blog/ directory that's accessed from (Normally, that would the regular URL for a single blog.) You could go ahead and actually run an installation so that you get a wp-config.php. Or you can use a text editor on wp-config-sample.php to put in the right values and save it to wp-config.php.

Now, in master-blog/wp-config.php, delete the lines with the define() calls for DB_NAME. Above that first group of define() calls, put

if (strpos($uri, '/blog1') === 0) {
    define('DB_NAME', 'db_blog1');
else if (strpos($uri, '/blog2') === 0) {
    define('DB_NAME', 'db_blog2');
else if (strpos($uri, '/blog3') === 0) {
    define('DB_NAME', 'db_blog3');
Now when you visit, WordPress will get the right database and, as luck would have it, that's all it needs. You still need to map to your master-blog/ directory though.

There are two ways of doing that: one is to use mod_alias on Apache, if you have access to your Apache's httpd.conf. Just put this into your httpd.conf:

Alias /blog1 "/wherever/wherever/.../master-blog"
Alias /blog2 "/wherever/wherever/.../master-blog"
Alias /blog3 "/wherever/wherever/.../master-blog"
Apache's default httpd.conf comes with examples of using mod_alias if you have trouble finding the right place. Just search for "Alias" in httpd.conf. It'll be commented out and with instructions.

The second option is to create a fake folder (a symlink) that's actually master-blog. So, in a shell,

$ cd /wherever/wherever/...
$ ln -s master-blog blog1
$ ln -s master-blog blog2
$ ln -s master-blog blog3
The downside to this is that this is convoluted and not user-friendly and requires familiarity with the command line and PHP and a little bit about how Apache works.

As a sidenote, a different background can be achieved if you point all three blogs to the same theme and in the head tag of your theme's index.php use PHP to include a different CSS file for each blog:

blah blah blah
if (strpos($uri, '/blog1') === 0) {
    echo '<link href='background-blog1.css' blah blah blah>'
else if (strpos($uri, '/blog2') === 0) {
    echo '<link href='background-blog2.css' blah blah blah>'
else if (strpos($uri, '/blog3') === 0) {
    echo '<link href='background-blog3.css' blah blah blah>'

posted by shadytrees at 5:29 PM on January 30, 2009 [1 favorite]

This is really easy to do with categories. Just make 3 categories, one each for individual "blogs" on the site. Then, in the header file in the theme, just make a conditional such as the following pseudocode:

if category1
   display picture1.jpg
else if category2
   display picture2.jpg
else if category3
   display picture3.jpg
   display defaultpicture.jpg

Then put all the navigational links in the header file, as well. And then include the header file in each of the category templates.

I was initially concerned that you'd lose the ability to use categories other than the top 3 as an organizational tool for the site, but as long as you use the "&exclude" operator in any category list code to exclude the 3 main "blog" categories, you'll be fine.
posted by msbrauer at 6:39 PM on January 30, 2009

« Older Really Big iPhones Are Not in Budget   |   What to do when depression disrupts your... Newer »
This thread is closed to new comments.