views:

57

answers:

3

I'm going to create a website using Wordpress static pages feature. It's going to have a menu for all the created pages.

A blog is going to be created as well. This blog has a completely different layout/menu from the main site, but within the same domain: "http://www.domain.com" is the website url, and "http://www.domain.com/blog/" is the blog url.

I was thinking of installing two different Wordpress instances: /var/www/public_html/ and /var/www/public_html/blog/. Although it's a simple solution, users are going to be duplicated: if you change password in one system, you need to change in the other.

So, I would like to know from you which other approaches are possible: create a "dynamic" theme (call a theme when in root domain, another whern /blog - dont even know if this is possible), or for example a plugin to syncronize users from both instances?

Does Wordpress MU solve this problem for me?

Thanks!

+2  A: 

You wouldn't need two installations. You could use WordPress conditionals to figure out if you're in the blog or cms part of the install and have it load a page template, css file, etc.. accordingly.

hsatterwhite
Yes,indeed. If you want the blog page as /blog, change the WordPress address and the Blog Address as appropriate in the General Settings page of WordPress. And, as hsatterwhite says, provide the appropriate components in your theme so that the blog page(s) are styled differently, with appropriate conditionals to, e.g. load different stylesheets or different components. For example, instead of the normal get_header() in your page.php, you could get_header("page"), which would pull in header-page.php instead of the normal header.php.
Matt Gibson
Kudos to Matt, I should of included that in the answer.
hsatterwhite
+1  A: 

I agree with hsatterwhite. Simple steps :

  1. Define (create) a new template page for your blog starting with :
    <?php
    /*
    Template Name: Blog
    */
    ?>
    at the very top of the page.
  2. Add a new page "blog" and choose the "blog" template (or whatever you called it before).
  3. Go to your administration page, and set up another static page to your front page (a page called "Home" for instance), and the blog page you've just created as the Posts page (screenshot from WP website)

Now you'll be able to control where the user arrives when he visits your site, and most importantly your CMS and blog layouts. You'll just have to play with WP and make it looking like it's 2 different parts of your website.

Nicolas.
ps: WP MU is was there to handle multiple users (MU), not multiple installations ;-) Anyway, in WP 3 I think WP and WP MU are merging together.

Nicolas
A: 

All these solutions you provided are supposed to create a lot of files and ifs in my theme folder, I appreciate your suggestions but this is no what I was looking for.

I found exactly what I needed in a plugin:

Want to switch between two themes according to a specific criteria in your URI?

Somebody still uses you MS-DOS