WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multiple blog pages, same user (1 post)

  1. StoarceCreierul
    Member
    Posted 4 years ago #

    While searching how to do this, I came across many posts from people asking the same question:
    How can one user post multiple blogs (without using multiple installs or using WordPress MU)?
    What if I want a blog about music and another one about automobils under the same template but on different pages like this:
    http://www.my*site/music/
    http://www.my*site/automobils/

    First, you must create the proper link pages (Music and Automobils). This differs from one template to another, in my case I had to modify/create them in header.php under a div called navigation.
    Next, you assign to each post one category. The trick is to limit the categories on each post to only one, and that category's name must be the same with that blog/page name. So music will be under "music" category and so on.
    Basically you have 2 different pages pointing to 2 different categories.

    By doing this, your 2 links will be:
    http://www.my*site/category/music/
    http://www.my*site/category/automobils/
    Since adding /category to each link is not desirable, you will remove that category base from the link using the WP No Category Base plugin. Installing instructions on plugin page.
    Now everything looks like it should and the links created point to the proper pages.

    If you want to take this further, and make one of the blogs your homepage - let's say you're a musician and your music blog should be directly on:
    http://www.my*site/
    you can show posts from only one category by using the WordPress query_posts() function. Simply insert the following code in your main index template before the loop begins:

    <?php
          query_posts("cat=-2");
    ?>

    where 2 represents the automobils category. This excludes all the posts that belong to category 2 - in our case automobils.
    Now, your home page will be the music blog and the next one the automobiles blog:
    http://www.my*site/
    http://www.my*site/automobils/
    Further reference: Query Posts.

Topic Closed

This topic has been closed to new replies.

About this Topic