• Resolved qbs

    (@qbs)


    in my admin panel I’ve set WP to display 3 posts per page and it works but I’ve noticed that this also influences the number of search results…

    I’d like all of my search results to be displayed on one single page, how do I do that?

    I reckon that the easiest way would be to change $posts_per_page; but I can’t figure out ho to change it just for the search.php template

    I’ve also found something like <?php query_posts(‘posts_per_page=-1&post_type=post’); ?>
    but for the love of god I can’t make it show ONLY the search results

    help…

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have exactly the same problem! help!

    Hey poster, this should help

    <?php query_posts(“$query_string . ‘&posts_per_page=-1′”); ?>

    Put that right before your loop. $query_string holds whatever the current query is. In this case it is your search.

    Good Luck =D

    Thread Starter qbs

    (@qbs)

    cg219: THANKS!!!!!!!!!!!!!!!!!!! 🙂

    @cg219
    Thanks that worked great! I have no idea why but I only showed 10 posts although counted many more found. Thanks again!

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

The topic ‘search.php – displaying results without pagination’ is closed to new replies.