• Resolved guel

    (@guel)


    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)
  • 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

    (@guel)

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"s=$s&showposts=-1"’ is closed to new replies.