By Thilak August 14, 2006

Random Post Plugin for Wordpress

Couple of days ago, a regular reader Fauzi (aka Cyperhackz) asked me how to show random post on the top of the blog and which plugin I used to do that.

Well there are lots of plugins out there for wordpress which enables you to show random post, but I use Random Posts from WASABI. If you strategically place Random Post on your blog it can be really useful. It gives deeper access for visitors on your blog.

Installation:

This plugin is fairly simple to install, Just download Random Posts Plugin by WASABI. Unzip it and upload it to your /wp-content/plugins directory using your favorite FTP client. Then go to Plugins in your Wordpress Admin panel and activate it.

Now Modify this code and add it to your Template

[code lang="php"]< ?php random_posts($limit, $len, $before_title, $after_title, $before_post, $after_post, $show_pass_post, $show_excerpt); ?>[/code]

[code]$limit - No. of posts to show.
$len - Lenght of auto-generate excerpt.
$before_title - Text to appear before the entry title.
$after_title - Text to appear after the entry title.
$befor_post - Text to appear before the entry excerpt.
$after_post - Text to appear after the entry excerpt.
$show_pass_post = Include/exclude password protected entries (Default: false).
$show_excerpt = Show/hide excerpt (Default: false).[/code]

Example: If you wish to show only a single random post (like mine), use the following tag

[code lang="php"]< ?php random_posts(1, 0, '', '', '', '', false, false); ?>[/code]

Download Random Posts Plugin

[tags]Wordpress, Random Posts, Plugins, Blogging[/tags]

Related Posts that you may like:

Discussion

Comments for “Random Post Plugin for Wordpress”

  • Use the following code in theme directly to use randoem post :

    <?php
    $randomPost = $wpdb->get_var("SELECT guid FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY rand() LIMIT 1");
    echo 'Random Post';
    ?>
  • is there a demo for this plug in?
  • This download link is down now. This is a dated post! I have created a plugin inspired by this entry, however. It displays ONLY a single random post. There are many other plugins that display multiple random posts, and they can be found on the wordpress plugins page.

    http://wordpress.org/extend/plugins/single-rand...
  • I found your page while looking for a plugin to show just a single random post. The download link and home page were down... so I kept looking. Didn't find one. So I made one. Scrap this if you consider it spam, but here you go:
    http://wordpress.org/extend/plugins/single-rand...
  • It seems that the download page is down.
blog comments powered by Disqus

Welcome to TechBuzz

TechBuzz is a technology blog read by 3000+ readers every day. We regularly write about new trends in technology, useful computer application and new web services. If you are new here, please subscribe our feed or opt for email updates to get new articles to your inbox.

Free Daily Updates

You can get fresh daily articles delivered straight to your feed reader or email inbox. Please subscribe to our RSS feed or opt for our free newsletter

Recent Posts

Google’s Chrome Tablet Concept Revealed
February 3, 2010
By Thilak
Ixquick. Ixquick allows users to surf the web with complete privacy. It let’s users surf the world wide web safely without revealing any personally identifiable or private information to the websites being viewed.

Ixquick is a free service which provides complete anonymity to the user enabling the user to surf the internet anonymously and safely. They claim it to be world’s most private search engine.

Surf The Internet Anonymously With Ixquick!

Surf The Internet Anonymously With Ixquick!
January 28, 2010
By Meghan
Apple iPad Unveiled
January 28, 2010
By Meghan
Happy New Year!
January 1, 2010
By Meghan
WordPress Version 2.9 Is Out!
December 19, 2009
By Meghan