The random post gadget will be another great way to display posts to your readers they might otherwise never see.This will keep visitors on your blog and hopefully turn them into return visitors and subscribers, Sounds Great lets do it !
With both you can choose the amount of posts you want listed and with the second you can choose how long you wish the summery to be.
Here's a screenshot of the first widget titles only:
Here's a preview of the second widget titles and summery:
Get The Random Posts List
And Here's how to add the widget to your blog :
1.Click 'Layout' For your blog
2.Click 'Add a gadget'
3.Select 'html/javascript'
4.Paste the code below in the code area provided :
(Use a title like 'Random Posts' 'Popular Posts'...)
Widget with titles only:
<script type="text/javascript">
var randarray = new Array();var l=0;var flag;
var numofpost=5;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;}}
if(flag==0&&l!=0){randarray[i++]=l;}}document.write('<ul>');
for(n in randarray){ var p=randarray[n];var entry=json.feed.entry[p-1];
for(k=0; k < entry.link.length; k++){if(entry.link[k].rel=='alternate'){var item = "<li>" + "<a href=" + entry.link[k].href + ">" + entry.title.$t + "</a> </li>";
document.write(item);}}
}document.write('</ul>');}
</script>
<script src="/feeds/posts/default?alt=json-in-script&start-index=1&max-results=1000&callback=randomposts" type="text/javascript"></script>
Change this piece of code to set how many posts are displayed:
var numofpost=5Widget with titles and summery :
<script type="text/javascript">
var randarray = new Array();var l=0;var flag;
var numofpost=5;var wordnumber=9;</script>
<script style="text/javascript" src="http://bloggertipspro.googlepages.com/random-posts-with-summary.js">
</script>
<script src="/feeds/posts/default?alt=json-in-script&start-index=1&max-results=1000&callback=randomposts" type="text/javascript"></script>
| We Are Nearly Finished - First A Quick Reminder: If you need more help or have an opinion or suggestion Please leave a comment Below.It also really helps me to get feedback. This is a Do-Follow Blog so leaving a comment will also help Your blogs Google rank. OK Back to business.... |
Change this piece of code to set how many posts are displayed:
var numofpost=5Change this piece of code to set how many words ore displayed in the summery are displayed:
var wordnumber=9Once your happy with the settings click save.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 !
Have you gone random ?
Did You Like This Post ? Click Like Below To Let Us And Your Friends Know - Thanks !
Write About Or Link To This Post On Your Blog - Easy Links :
Link Directly To This Post :
Link To The Homepage :
Link Directly To This Post :
Link To The Homepage :
Hey ! People That Read This Post Also Loved These Posts
Still Looking For Something ?
Search This Blog
Custom Search
In order to keep our comments Do-Follow we have some guidelines you need to follow.
Do not put links in the body of your comment as it will automatically be blocked !
Asking a question ? Make sure to tick the subscribe to comments by email box to be alerted of the reply.






Anyone Can Guest Post On Spice Up Your Blog !
