Title: query_posts as an array
Last modified: August 19, 2016

---

# query_posts as an array

 *  Resolved [kayjayone](https://wordpress.org/support/users/kayjayone/)
 * (@kayjayone)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/query_posts-as-an-array/)
 * Had the current query_posts working…
 * `<?php query_posts( 'posts_per_page=5&cat=6&post_status=future,publish&order=
   ASC')?>`
 * Wanted to add tag to the query, from my understanding you cannot query on both
   category and tag unless you use an array. Implemented the following with no data
   returned…
 * `<?php query_posts(array('cat'=>'6','tag_slug__and'=>array($current),'showpost'
   =>'5','post_status'=>'future,publish','order'=>'ASC') );?>`
 * There is one record that should be returned. Is there an error in the code?

Viewing 1 replies (of 1 total)

 *  Thread Starter [kayjayone](https://wordpress.org/support/users/kayjayone/)
 * (@kayjayone)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/query_posts-as-an-array/#post-854305)
 * my apologies, it is working the record had not been published.

Viewing 1 replies (of 1 total)

The topic ‘query_posts as an array’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [kayjayone](https://wordpress.org/support/users/kayjayone/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/query_posts-as-an-array/#post-854305)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
