how to display random posts in wordpress

how to display random posts in wordpress

if you want to display random post using page or custom template in wordpresss

paste this code in your custom template where you will want to show the results

Option 1 :: display post using the custom template

Copy easy_random_posts() function and paste into your functions.php file of the current theme

Option 2 : Automatically Display on Home page footer

paste this function in your functions.php file on the current theme