$myquery['tax_query'] = array(
	array(
		'taxonomy' => 'category',
		'terms' => array('cat1', 'cat2'),
		'field' => 'slug',
		'operator' => 'NOT IN',
	),
);
query_posts($myquery);

Leave a Reply