Is it possible to paginate posts correctly that are random ordered?

Posted by Prem Tiwari | Updated on

Is it possible to paginate posts correctly that are random ordered?

You can generate a random number on the first page load then store it in a SESSION variable and use that as the $seed for further paginated requests.

If you are trying to acheive this on your main loop for instance, you could add the following to your functions.php file.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers