Title: &#039;category__not_in&#039; Parameter
Last modified: August 19, 2016

---

# 'category__not_in' Parameter

 *  [8KCAB](https://wordpress.org/support/users/8kcab/)
 * (@8kcab)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/category_not_in-parameter/)
 * Hello all.
 * I’m trying to exclude a category from some places. This one did what I wanted
   it to:
 * > <?php query_posts(array(‘category__not_in’ => array(13))); ?>
 * This one isn’t working:
 * > query_posts($query_string . “&orderby=comment_count&posts_per_page=25&(‘category__not_in’
   > => array(13)))”);?>
 * Neither is this one:
 * > $args = array(
   >  ‘author’ => $curauth->ID, ‘order’ => DESC, ‘posts_per_page’
   > => 10 ‘category__not_in’ => 13, ); query_posts($args);?>
 * Any ideas? Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/category_not_in-parameter/#post-1782779)
 * `<?php query_posts(cat=-13); ?>`
    [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 *  Thread Starter [8KCAB](https://wordpress.org/support/users/8kcab/)
 * (@8kcab)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/category_not_in-parameter/#post-1782854)
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘'category__not_in' Parameter’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [8KCAB](https://wordpress.org/support/users/8kcab/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/category_not_in-parameter/#post-1782854)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
