I want to show only a random selected number of search results from a search. Its different to the random output from a category. Any Ideas how to do this? it is for a big database to give every post of the search result the chance to be viewed.
Leave a Reply
You must be logged in to post a comment.
This is easy to do using the
pre_get_posts
action hook to set theorderby
torand
in the query, something like this: