Support » Installing WordPress » How do I set the start page to only one category?

  • I have 2 categories in my Blog, I would like to have the Business Category to show on the first page when someone arrives.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can also just change the beginning of your loop. This change is to be made to your Main Index Template (Presentation >> Theme Editor):

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

    to:
    <?php if (have_posts()) : query_posts($query_string .'&cat=-2'); while (have_posts()) : the_post();

    Also, change the category number to whatever category you want to exclude (just keep that “-” in front of the number). Since you only have 2 categories, there will only be one category that can display on your home page. If you ever add more categories, this solution may not work because you can only exclude one category.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I set the start page to only one category?’ is closed to new replies.