post list

Add A New Random Post List Gadget To Your Blog

random Posts

This post has been rewritten on 22-09-10 to include a new improved random post gadget. The previous gadget had stopped working. Thanks to Sylvia from Classical Bookworm for the heads up.

Most blogs have Recent Post and maybe Popular Posts gadgets in the sidebar and footer and these help keep readers on you blog and display some of  your best posts. But only the random posts gadget really digs deep into your archive and helps keep those old posts rotating. Adding the Random Posts Gadget will only take a minute so lets look at the steps.

Add A Random Posts Gadget To Your Blog

Step1. In your dashboard click ‘Design’ > ‘Add A Gadget’

Step 2. Choose Html/Javascript Gadget and paste the following code into the area provided :

<a href=''><img alt='Best Blogger Tips' src=''/></a><script type="text/javascript">
var randarray = new Array();var l=0;var flag;
var numofpost=6;function randomposts(json){
var total = parseInt(json.feed.openSearch$totalResults.$t,10);
for(i=0;i < numofpost;){flag=0;randarray.length=numofpost;l=Math.floor(Math.random()*total);for(j in randarray){if(l==randarray[j]){ flag=1;}}
for(n in randarray){ var p=randarray[n];var entry=json.feed.entry[p-1];
for(k=0; k <; k++){if([k].rel=='alternate'){var item = "<li>" + "<a href=" +[k].href + ">" + entry.title.$t + "</a> </li>";
<script src="/feeds/posts/default?alt=json-in-script&start-index=1&max-results=1000&callback=randomposts" type="text/javascript"></script>

Note : You can change the number in red to choose how many posts you list to have displayed.

Step 3. Give the gadget a title, Like : ‘Random Posts’, ‘Posts From The Archive’ etc.. Save The Gadget.

You have just added a cool new way for people to navigate your blog, make sure to check out some more great Blog Gadgets you will love !

Comments And Questions Welcomed Below.

What My Robot Recommends:

Add A New Random Post List Gadget To Your Blog
Easy To Read
Reader Rating0 Votes