• I’ve been trying to exclude posts from certain categories in my blog.

    I have found some success using the following code:

    <?php if(have_posts()): ?><?php while(have_posts()):the_post(); ?>
    <?php if (in_category(’15’)) continue; ?>

    however – this messes up the number of posts that appear on each page. I have my Reading options set to display 10 posts per page, but my blog is displaying much less than that.

    It appears that instead of removing posts of a certain category from the loop – this code is keeping them in, but just making them invisible.

    Here is a link to my blog:
    http://www.2nimprov.com/blog

  • The topic ‘Excluding posts of certain categories’ is closed to new replies.