Show random posts on front page


Note : the following code snippet requires advanced WordPress developer skills. There's no guarantee that this snippet works as is with the latest version of our themes, and with the latest version of WordPress. That's why you need to always test any code snippets in a staging environment before implementing it in a production site.


By default, the latest posts list on the front page gets displayed in reverse chronological order and that is what latest posts is. Can you customize it further?

Can you display random posts on the front page?

Add this small bit of code to your child theme’s functions.php and you can indeed display random posts on your front page.

 


Related Snippets you may also like


6 thoughts on “Show random posts on front page

Comments are closed.