Random Thumbnail Posts Widget for Blogger

Random Posts Widget
There may be several posts in a blog and it is not possible to show all of your posts on home page of any site and blog. In fact all the posts can be equal important for any time. In that case you should update your posts repeatedly to show older posts in home page.

Yes there is also another way to show your older posts in home page and that technique is to show random posts. Random posts widget is a block of codes for blogger which shows a no of list of blogger posts. Adding this widget may help you to increase the visiting time of visitor in your blog or site and also decrease users flow to another site. Here is the block of codes of random thumbnail posts. I hope, this will enjoy you on blogging.


How to Add Random Thumbnail Posts Widget for Blogger ?



Step 01: Login >>Blogger Dashbord.
Step 02: Go to Layout >> Add Widget >> HTML/JavaScript.
Step 03: Copy the following code and paste it

<style>
#random-posts img{border-radius: 10px;float:left;margin-right:5px;
width:75px;height:75px;background-color: #F5F5F5;padding: 3px;transition: all 0.2s linear 0s;}
#random-posts img:hover{opacity: 0.7;}
ul#random-posts {list-style-type: none;padding: 10px;}
#random-posts a {font-size:16px;  text-decoration: none !important; text-transform: capitalize; padding: 0px auto 5px;}
#random-posts a:hover {text-decoration: none;}
.rp-snippet {font-size: 11px;background: none; padding: 5px; margin-right: 8px;}
#random-posts span {}
#random-posts li {margin-bottom: 10px;border-bottom: 1px solid #EEEEEE; padding: 4px;}
</style>
<ul id='random-posts'>
<script type='text/javaScript'>
var rdp_numposts=5;
var rdp_snippet_length=110;
var rdp_info='yes';
var rdp_comment='Comments';
var rdp_disable='Comments Disabled';
var rdp_current=[];var rdp_total_posts=0;var rdp_current=new Array(rdp_numposts);function totalposts(json){rdp_total_posts=json.feed.openSearch$totalResults.$t}document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results=0&callback=totalposts\"><\/script>');function getvalue(){for(var i=0;i<rdp_numposts;i++){var found=false;var rndValue=get_random();for(var j=0;j<rdp_current.length;j++){if(rdp_current[j]==rndValue){found=true;break}};if(found){i--}else{rdp_current[i]=rndValue}}};function get_random(){var ranNum=1+Math.round(Math.random()*(rdp_total_posts-1));return ranNum};
</script>
<script type="text/javascript" src="http://googledrive.com/host/0B-GuAkK2nj5gUG1oMzkzZEExclU"></script><hr/><small><a style='margin-left:10px;font-size:8px;align:right;float:right;margin:2px;text-transform:capitalize;color:#AEAEAE;' href='http://allblogsolution.blogspot.com' target='_blank'>Random posts widget</a></small>
</ul>
Step 04: Save it.

Thank you. I hope you enjoyed this widget.

Post a Comment

4 Comments

  1. how to remove titles of thumbnails?

    ReplyDelete
  2. Great post about random posts widget, I learn a lot about this widget form here. Thank you for sharing.
    Check this post

    ReplyDelete
  3. Nice Article.. But i am looking for adding random posts from diffrent blog in my blog . Is there any idea how to do that. Thanks In Advance

    ReplyDelete

Any comment will be appreciated, comment will be published according to our comment policy