• lewismathew

    (@lewismathew)


    Hi

    I am wanting to create two blogs on my website that show up on two different pages?

    I have created 2 separate categories 1. Recipes 2. Blog

    In my main name nav I have created all my pages including Recipes and Blog.

    I want these two pages to be blog layout pages. For example the Recipes page. Whenever I create a new recipe as a post and add it to the recipes category , I want that new recipe to display on the recipes page along with the other excepts of recipes i have created.

    This is the same for the blog page.

    Can anyone help me with this issue as I am stuck on how to make this happen.

    Thanks in Advance
    M

Viewing 3 replies - 1 through 3 (of 3 total)
  • saildude

    (@saildude)

    try this

    http://codex.wordpress.org/Pages

    I have not used the below Plug-in – but looks like it might do what you want – also look in the regular Plug-in section under “Extend” “Plug-ins” for others –

    Pages are not Posts, nor are they excerpted from larger works of fiction. They do not cycle through your blog’s main page. (Note: You can include Posts in Pages by using the Inline Posts Plugin.)

    http://aralbalkan.com/1016

    Thread Starter lewismathew

    (@lewismathew)

    Okay cheers I will try it…

    imageworks002

    (@imageworks002)

    After finding this post and having the same problem, I came up with a better way to do it.

    You want to look at this page first.
    http://codex.wordpress.org/Template_Tags/query_posts

    Then you want to add code similar to this at the top of your index.php file

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    //The Query
    $whichcat=$_GET["cat"];
    if ($whichcat==blog) {
    	query_posts('category_name=Blog');
    	}
    else if ($whichcat==recipe) {
    	query_posts('category_name=Recipe');
    	}
    else {}
    
    get_header(); ?>

    Then, just add &cat=blog to the end of your url, and it will pull only posts categorized as “blog”.

    You’ll have to have navigation that has hardcoded links, so you can build them properly.

    Obviously, if someone where to remove that part of the query string, it would mess up your page, but all that would happen is that it would show both categories instead of one, which isn’t much of a downside. Of course someone could link to you this way, and you would end up getting a lot of visitors coming to the wrong link. I’m sure there are some people who are better at PHP who could improve on this method.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create 2 separate Blog pages on website?’ is closed to new replies.