I have a custom post type called 'portcat' and I want to exclude one portcat category ('weather' - ID='5') from the page. I've tried 'category__not_in' => array( 5 ) but apparently this doesn't work with custom post types. What can I add to the below code to exclude it?
<?php
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$args = array(
'post_type' => 'port',
'paged' => $paged,
'posts_per_page' => get_theme_option("portfolio_work_count"),
);
if (isset($_GET['slug'])) {
$args['tax_query']=array(
array(
'taxonomy' => 'portcat',
'field' => 'slug',
'terms' => $_GET['slug']
)
);
}
'operator' => 'NOT IN'
in your taxonomy query. – RRikesh May 7 '13 at 5:24