• Resolved deko

    (@deko)


    When a visitor first arrives at my blog, I only want to display posts in category 1 (the default category).

    All other posts are categorized and can be selected from a nav bar.

    I tried modifying the loop in /wp-contnet/themes/default/index.php:

    <?php if (have_posts() && in_category(‘1’)) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">

    But this does not work.

    Any idea how to accomplish this?

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to exclude categories from loop?’ is closed to new replies.