Our online behavior is random, just like the events in our lives sometimes.
We will be reading one thing and then next thing we see is we move on to something else totally different in context – thanks to all the distracting plethora of information available online.
The fact is, it is not the problem with the internet, but that’s the way how our mind works too. Similarly, I wanted to show you how to add a menu item to a WordPress blog and make it go to any of your blog posts…in a random fashion.
In WordPress, there is a cool way to show random posts with a click of a button.
There is a neat plugin created by the creator of WordPress, Matt Mullenweg called Random Redirect. This can be accomplished by adding codes to your theme too, but if you prefer a neat to-the-job plugin, then Random Redirect is the way to go.
Step 1: Download the plugin from here. Install and activate it.
Step 2: Add a menu item with whatever name you want. E.g. ‘Random’, ‘Surprise me’, ‘I am curious’, etc. from the Appearances > Menus
Step 3: Add the link as yourdomainname.com/?random=
(replace the yourdomainname with your actual domain name)
That’s all you have to do to add a menu item to show random posts from your WordPress site.
In case you want to accomplish this without using any plugin, then there is a wonderful post written by Syed Balkhi and his team at wpbeginner.com.