Title: Custom post type taxonomy exclude
Last modified: August 21, 2016

---

# Custom post type taxonomy exclude

 *  [minimalist-sa](https://wordpress.org/support/users/minimalist-sa/)
 * (@minimalist-sa)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-taxonomy-exclude/)
 * Hi, I have a cutom post type named : art & design and i have a taxonomy called
   main slider, in one loop i have only posts from the taxonomy main slider and 
   in the other loop i have the loop for the custom post type art & design but i
   want to exclude the taxonomy ?
 * 1st loop
 *     ```
       <?php
         	$args = array( 'artdesign_mainslider' => 'art-design-featured-post', 'posts_per_page' => 5 );
       $loop = new WP_Query( $args );
       while ( $loop->have_posts() ) : $loop->the_post();  ?>
   
       <?php endwhile; ?>
       ```
   
 * 2nd loop ( i want to exclude artdesign_mainslider)
 *     ```
       <?php
           $args = array( 'post_type' => 'art_design', 'posts_per_page' => 10, );
       $loop = new WP_Query( $args );
       while ( $loop->have_posts() ) : $loop->the_post();  ?>
   
       <?php endwhile; ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-taxonomy-exclude/#post-4075887)
 * One possibility: Select an array of all the IDs of posts with ‘artdesign_mainslider’
   and use that as the ‘post__not_in’ parameter of the second query.

Viewing 1 replies (of 1 total)

The topic ‘Custom post type taxonomy exclude’ is closed to new replies.

## Tags

 * [exclude](https://wordpress.org/support/topic-tag/exclude/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-taxonomy-exclude/#post-4075887)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
