Title: query posts &#8211; post_type array
Last modified: August 20, 2016

---

# query posts – post_type array

 *  [jbiddulph](https://wordpress.org/support/users/jbiddulph/)
 * (@jbiddulph)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/query-posts-post_type-array/)
 * Hi,
 * I have a query with an array containing all post_types. This sort of works fine
   although the final part of my query after the array doesn’t seem to work, it 
   should only show category 13 and 5 posts
 * my site: [here](http://judd-dev.co.uk/pitch/)
 *     ```
       <?php query_posts(array(
       	        'post_type' => array(
       	                    'post',
       	                    'page',
       	                    'our-work',
       	                    'careers',
       						'blog',
       						'news'
       	                ),'&cat=13&showposts=5')); ?>
       ```
   

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/query-posts-post_type-array/#post-2704294)
 * Try:
 *     ```
       <?php $args = array(
       	'post_type' => array('post', 'page', 'our-work', 	'careers', 'blog', 'news' ),
       	'cat' => 13,
       	'posts_per_page => 5
       );
       query_posts( $args );?>
       ```
   
 *  Thread Starter [jbiddulph](https://wordpress.org/support/users/jbiddulph/)
 * (@jbiddulph)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/query-posts-post_type-array/#post-2704308)
 * thanks

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

The topic ‘query posts – post_type array’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [jbiddulph](https://wordpress.org/support/users/jbiddulph/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/query-posts-post_type-array/#post-2704308)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
