Is there a way to display all the search results on the search.php
?
Actually it is displaying only 10 results (as set in WordPress settings > general
).
Leave a Reply
You must be logged in to post a comment.
Is there a way to display all the search results on the search.php
?
Actually it is displaying only 10 results (as set in WordPress settings > general
).
You must be logged in to post a comment.
The quick and dirty way to do it would be to use
query_posts
again, doubling the number of database calls.Better would be to add this to
functions.php
, altering the original query before it is executed:If you want to show an unlimited amount of posts, use
-1
.Pretty easy:
-1
overrides the limit. Just merge the default query with your custom arguments.Try http://wordpress.org/extend/plugins/custom-post-limits/ You can set independent post limits/numbers for all kinds of results, i.e. search, category, tag, archives, author, paged, etc., without needing page templates or custom loops.