If you take a look at the category parameters of WP_Query
, you’ll see that you can use either cat=-12
or category__not_in' => 12
to exclude a category with ID 12 in your custom query.
I just also want to point out a few things here. showposts
is depreciated, you should be using posts_per_page
. Also 'showposts=6' . '&paged='.$paged
is wrong. You should just use &
between your parameters. So you should do something like this 'posts_per_page=6&paged='.$paged
To conclude, to exclude the category ‘Tour’, which is what I presume from your code, you can do change this line
$wp_query->query('showposts=6' . '&paged='.$paged);
to
$wp_query->query('posts_per_page=6&cat=-' . $category_id . '&paged='.$paged);