• Is there any way to do this?

    I’d like to have two pages on my blog: reviews and news.

    And on both of the pages, have a separate blog. So can I make some of my posts appear only on the page “news” and some only on the page “reviews”?

    Is there a pluhin to do this or some other way?

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’ve done this with my blog recently, here’s how I did it: You create a category called “reviews” and then put this code in your index.php

    <?php if (in_category('###') && is_home()) continue; ?>

    Where you see ‘###‘ replace that with the “reviews” category number

    that code goes directly under:
    <?php while (have_posts()) : the_post(); ?>

    This makes the posts published under “reviews” get ignored by the home page.

    Then what I did was added a link for the skipped category to my nav bar.

    Hope this helps ??

    Thread Starter afly

    (@afly)

    Thanks, but.. I can’t find that line from my index.php :S

    <?php while (have_posts()) : the_post(); ?>

    When I’m in my control panel clicking on Main Index template (i.e. index.php)it’s near the top, only about 9 lines from the top.

    Thread Starter afly

    (@afly)

    Ah, got it! Thanks a lot!

    Now I just got to figure out how to show the blog posts from this category on the “reviews”-page.. Or how to redirect the reviews-page to the reviews-category…

    Thread Starter afly

    (@afly)

    Darn.. Doesn’t work afterall

    <?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    <?php if (in_category('X') && is_home()) continue; ?>

    I tried with category number, name, slug.. No luck. It just shows all thee posts on the homepage. What’s wrong?

    Did it look like this (’45’)? The quotes have to be in there.

    suggestion – create category templates (read whole section)
    — e.g. category ID of reviews is #34 and category ID of news is #45
    — create category template with specific ID extension for each one:
    reviews = category-34.php
    news = category-45.php

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Two pages, two blogs?’ is closed to new replies.