WordPress.org

Support

Support » How-To and Troubleshooting » Need a better way to hide categories from the index loop

Need a better way to hide categories from the index loop

  • `<?php while (have_posts()) : the_post(); ?>
    <?php if (in_category(‘516’)) continue; ?>`

    I’ve been using the above hack to not show category ID 516 in my main loop. It works well except now at http://outletzine.org i only have one post at a time on the front page.

    The problem is – when somebody goes to look at the previous entries (http://outletzine.org/page/2/) they are presented with a blank page where a post from category 516 would be.

    Does anybody know of a better workaround or a plugin/settings change that would prevent this from happening?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need a better way to hide categories from the index loop’ is closed to new replies.