Hello guys
The problem excluding cat′s with <?php query_posts($query_string . '&cat=-4723,-1618'); ?>
is when you want use the $query_string
coming from another page with, i.e., cat=6
. In this cases, you are defining twice the cat variable inside the query_posts()
function and the result is a query for the last definition.
I recommend, for this cases, something as:
<?php $myCats = array(12,27,31); // Excluded Categories
query_posts($query_string); // Requested variables
if(have_posts()) :while (have_posts()) : the_post();
if(in_category($myCats)) continue;
?>