I have a custom post type set up called
projects with a custom taxonomy called
categories that has a number of terms. For one of them called
archive I would like to remove its associated posts from the custom post loop. I'm attempting with the code below, but doesn't seem to be excluding.
<?php $loop = new WP_Query( array( 'post_type' => 'projects', 'orderby'=>'rand', 'posts_per_page' => -1 ) ); query_posts( array( 'post_type' =>'projets', 'tax_query' => array( array( 'taxonomy' => 'categories', 'field' => 'slug', 'terms' => array( 'archive', ), 'operator' => 'NOT IN',),) ) ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> POST CONTENT <?php endwhile; ?>