Random post option in wordpress...

Wanna create a Random post option in your wordpress blog just like Random article option in Wikipedia.....?

Then read this small tut.....


  • In order to have random post or Random article facility in the wordpress powered blogs,you need to download the Random Redirect plugin.
    Link: http://downloads.wordpress.org/plugin/random-redirect.zip

  • Activate the plugin

  • The plugin will create a link to blogurl/?random which will redirect to a random post of your blog.For example in case of my blog the link will be http://blog.aditech.info/?random

  • Now we have to create make use of this link. This method will differ from theme to theme but the important point is the random post will be given at the link blogurl/?random.In almost all the themes there will be nav_menu.php file.Edit this file in the Theme editor and add the following lines

    <li><a <?php if (is_page('?random')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/?random">Random post</a>



  • That's it...
    Hope you liked this small tutorial...
    Waiting for your comments and SHOUTS..

    About This Blog

    There is something for everyone. !! A tech blog on various topics. Let it be devops, programming etc; we have it all covered here in layman terms :)

    Total Pageviews

    Back to TOP