Title: &quot;s=$s&amp;showposts=-1&quot;
Last modified: August 19, 2016

---

# "s=$s&showposts=-1"

 *  Resolved [guel](https://wordpress.org/support/users/guel/)
 * (@guel)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/ssshowposts-1/)
 * What does $allsearch = &new WP_Query(**“s=$s&showposts=-1”**); do in search? 
   I want to add array(‘post_type’ => ‘post’ ); to make it return only posts. How
   can I do that?
 * Is s=$s&showposts=-1 important?
 * Thanks

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

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/ssshowposts-1/#post-1798677)
 * > Is s=$s&showposts=-1 important?
 * s=$s is the search criteria. showposts=-1 says return all posts.
 * Give this a try:
 * `$allsearch = &new WP_Query("s=$s&showposts=-1&post_type=post");`
 *  Thread Starter [guel](https://wordpress.org/support/users/guel/)
 * (@guel)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/ssshowposts-1/#post-1798698)
 * Thank you!

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

The topic ‘"s=$s&showposts=-1"’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [guel](https://wordpress.org/support/users/guel/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/ssshowposts-1/#post-1798698)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
