Title: &#039;category__and&#039; issue
Last modified: August 20, 2016

---

# 'category__and' issue

 *  [wouterbaltus](https://wordpress.org/support/users/wouterbaltus/)
 * (@wouterbaltus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/category_and-issue/)
 * Hi there,
 * I have build a custom query_post.
    In code it looks to every category after /
   catetory/ in the url. With my query I want posts that have ALL that categories.
 * I know I have to work with ‘category__and’ in this case, but the strange thing
   is, that, with two or more categories, it also returns posts that have one of
   that categories.
 * For example see: [http://gamesscore.nl/category/playstation-3/actie/](http://gamesscore.nl/category/playstation-3/actie/)
   
   I have print the query_post on the page. It’s:
 * category__and=6,32&caller_get_posts=1&orderby=&order=DESC&gdsr_sort=&gdsr_order
   =&paged=0&posts_per_page=10
 * But it return also a post that not has category 32 (actie).
 * What am I doing wrong???

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/category_and-issue/#post-3074998)
 * you need to use the array syntax –
 * there is an example under [http://codex.wordpress.org/Function_Reference/query_posts#Combining_Parameters](http://codex.wordpress.org/Function_Reference/query_posts#Combining_Parameters)
 *  Thread Starter [wouterbaltus](https://wordpress.org/support/users/wouterbaltus/)
 * (@wouterbaltus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/category_and-issue/#post-3075014)
 * Oke, thnx, I will give it a try!

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

The topic ‘'category__and' issue’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [wouterbaltus](https://wordpress.org/support/users/wouterbaltus/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/category_and-issue/#post-3075014)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
