Title: WP_Query(&quot;cat=4&amp;showposts=4&quot;); question
Last modified: August 19, 2016

---

# WP_Query("cat=4&showposts=4"); question

 *  [lilith2014](https://wordpress.org/support/users/lilith2014/)
 * (@lilith2014)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/wp_querycat4showposts4-question/)
 * Good day,
 * I would like to know how to change this code:
    `<?php $recent = new WP_Query("
   cat=4&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>`
 * to display more categories, instead of only one?
 * Newbie here, thank you.

Viewing 1 replies (of 1 total)

 *  [Chinmoy](https://wordpress.org/support/users/chinmoy/)
 * (@chinmoy)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/wp_querycat4showposts4-question/#post-1592529)
 * `<?php $recent = new WP_Query("showposts=4"); while($recent->have_posts()) : 
   $recent->the_post();?>`
 * Try this once.

Viewing 1 replies (of 1 total)

The topic ‘WP_Query("cat=4&showposts=4"); question’ is closed to new replies.

## Tags

 * [?cat](https://wordpress.org/support/topic-tag/cat/)
 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chinmoy](https://wordpress.org/support/users/chinmoy/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/wp_querycat4showposts4-question/#post-1592529)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
