query_posts( $query_string . '&cat=-XX' ) does not work as it supposed to do
All i want to do is exclude posts that belongs to one category from blog index (index.php).
So here is what I did, and was sure it will work:
<?php global $query_string; ?> <?php query_posts( $query_string . '&cat=-X' );?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> . . . <?php endwhile; endif; ?>
But posts from category number X are still displayed in blog index. The only working solution was to use:
<?php if (in_category('8')) continue; ?>
but it mess with posts number (counts hidden post to global posts number on page) and it is not solution I’m seraching for.
Please – show me, where my thinking is wrong.
Thanks in advice
- The topic ‘query_posts( $query_string . '&cat=-XX' ) does not work as it supposed to do’ is closed to new replies.