Random Posts Widget For Blogger Blog

This random post widget helps to show the random post of your blog. It helps to increase page views of your blog. This widget comes with Title of the post, Published date, Number of comments in the post with image thumbnail. So lets starts the process to add this random post widget on your blog.
Random post widget,blogger widget

Random Post Widget For Blogger

Before starting this tutorial i recommend you to backup the blogger template.(Learn How to backup templates on blogger older interface & How to backup templates on blogger new interface.)
  • For Older Blogger Interface : Go to Blogger > Design >Edit HTML>Expand  Widget Template .
  • For Newer Blogger Interface : Go to Blogger>Template>Edit HTML>Proceed>Expand Widget Template.
  • Then search (CTRL+F) for ]]></b:skin> and add the below code just before  ]]></b:skin> .
#random-posts img{float:left;margin-right:10px;border:1px solid #999;background:#FFF;width:36px;height:36px;padding:3px}
  • Save the template.
Then next step is to add the HTML code on your blog. For that follow the process given below:

For Older Blogger Interface: How To Add?

  • Go to Blogger>Design>Page Element
  • Click Add a Gadget option



  • Select HTML/JavaScript option. Paste the html code provided below.
  • Save the Gadget.

For New Blogger Interface: How To Add?

  • Go to Blogger (NoteIf  you are managing more than one blog then choose the blog you want to add News Widget)
  • Then go to Layout option
  • Click Add a Gadget option
  • Select HTML/JavaScript option. Paste the html code provided below.
  • Save the Gadget.

Add Below Code On Your Blog

<ul id='random-posts'><script type='text/javaScript'>var rdp_numposts=10;var rdp_snippet_length=150;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'>function random_posts(json){for(var i=0;i<rdp_numposts;i++){var entry=json.feed.entry[i];var rdp_posttitle=entry.title.$t;if('content'in entry){var rdp_get_snippet=entry.content.$t}else{if('summary'in entry){var rdp_get_snippet=entry.summary.$t}else{var rdp_get_snippet="";}};rdp_get_snippet=rdp_get_snippet.replace(/<[^>]*>/g,"");if(rdp_get_snippet.length<rdp_snippet_length){var rdp_snippet=rdp_get_snippet}else{rdp_get_snippet=rdp_get_snippet.substring(0,rdp_snippet_length);var space=rdp_get_snippet.lastIndexOf(" ");rdp_snippet=rdp_get_snippet.substring(0,space)+"&#133;";};for(var j=0;j<entry.link.length;j++){if('thr$total'in entry){var rdp_commentsNum=entry.thr$total.$t+' '+rdp_comment}else{rdp_commentsNum=rdp_disable};if(entry.link[j].rel=='alternate'){var rdp_posturl=entry.link[j].href;var rdp_postdate=entry.published.$t;if('media$thumbnail'in entry){var rdp_thumb=entry.media$thumbnail.url}else{rdp_thumb="http://1.bp.blogspot.com/-v6XbCYAVV7o/UEMRCev1H-I/AAAAAAAADf0/PFwqDiY4jVg/s1600/na_image.jpg"}}};document.write('<li>');document.write('<img alt="'+rdp_posttitle+'" src="'+rdp_thumb+'"/>');document.write('<div><a href="'+rdp_posturl+'" rel="nofollow" title="'+rdp_snippet+'">'+rdp_posttitle+'</a></div>');if(rdp_info=='yes'){document.write('<span>'+rdp_postdate.substring(8,10)+'/'+rdp_postdate.substring(5,7)+'/'+rdp_postdate.substring(0,4)+' - '+rdp_commentsNum)+'</span>'}document.write('<div style="clear:both"></div></li>')}};getvalue();for(var i=0;i<rdp_numposts;i++){document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&start-index='+rdp_current[i]+'&max-results=1&callback=random_posts\"><\/script>')};</script></ul>
You can replace 10 with the number of post you want to show.
  • Save the template and your are done.

COMMENTS

BLOGGER: 2
Loading...
Name

Aastha Band,1,Alcatel,1,Android,17,Android One,1,Anju Pant,26,Apple,18,ARK,3,Badri Pangeni,1,Basanta Thapa,2,Bhojraj Kafle,2,Bima Kumari Dura,6,Bimal Raj Chhetri,2,Bindu Pariyar,5,Birahi Karki,1,Bishnu Khatri,2,Bishnu Majhi,8,Blogger,130,Blogger Templates,16,Blogger Widgets,57,Blogging Tips and Tricks,74,BQ,1,Car Price in Nepal,2,Celkon,4,CG TV,1,Colors,9,Computer Tips,58,Dashain,1,Dashain Tihar Songs,43,Datsun,1,Deepak Limbu,8,Dell,2,Deuda,1,Devi Gharti,30,English Jokes,24,Entertainment,948,Facebook,39,FIFA World Cup,2,Fonts,5,Free Giveaway,6,Free Icons,3,Free SMS,5,Gionee,3,Google,16,Google Plus,5,Guest Post,32,Gurung Movie,2,Hemant Sharma,4,Hemanta Shisir,18,Hero,1,Hindi Jokes,5,Hollywood,1,How To,41,Huawei,15,Hum Gaire,2,Increase Blog Traffic,14,Indira Joshi,4,Info Dose,425,Internet Tips,92,Intex,1,Jokes Collection,97,Juna Shrish,6,Jyoti Magar,1,Kalpana Devkota (Poudel),6,Kamal Shrestha,1,Karbonn,1,Kauda Song,2,Keshu Gurung,1,Khuman Adhikari,9,Komal Oli,1,Korean Songs,1,Krishna Gurung,2,Kulendra BK,3,Laptop Price,2,Lava,5,LG,6,LG TV,2,Load Shedding Schedule,19,Lok Dohori Songs,268,Magar Bhasa,2,Mandavi Tripathi,6,Manju Poudel,2,Manoj Raj,7,Melina Rai,1,Micromax,12,Microsoft,2,Mobile Phone Price in Nepal,102,Movie Promo,80,Muna Thapa Magar,7,Narendra Pyasi,17,Ncell,18,Nepali Cricket,7,Nepali Full Movie,110,Nepali Jokes,72,Nepali Model,1,Nepali Movie Songs,199,NTC,22,Obi Worldphone,2,Online Banking,4,Online Earning,7,Page Navigation,4,Panasonic,3,Panasonic TV,1,Pashupati Sharma,5,Philips TV,1,Photo Gallery,7,Pinterest,2,Pokemon Go,1,Pop and Adhunik Songs,206,Poster Release,103,Prakash Katuwal,4,Pramod Kharel,11,Purnakala BC,29,Puskal Sharma,1,Radhika Hamal,6,Rajan Gurung,1,Rajesh Payal Rai,6,Rajina Rimal,11,Raju Gurung,2,Raju Pariyar,5,Ram Krishna Dhakal,4,Ramji Khand,15,Rishi Khadka,1,Roila Song,4,Roshan Gaire,1,Sabina Gurung,1,Salaijo,4,Samsung,22,Samsung TV,4,Sarada Tamang,1,Sardarji Jokes,5,SEO Tips,6,Sharmila Gurung,2,Shiva Pariyar,20,Shreedevi Devkota,2,Sindhu Malla,1,Smart Phones,23,Smriti Pun,1,SMS,1,Software Download,14,Sony,3,Sony TV,1,Sudip Adhikari,1,Swaroop Raj Acharya,10,Tata,1,Technology,264,Teej Song,49,Tejas Regmi,2,Tika Pun,16,Top List,2,Trishna Gurung,8,TU Notice,10,TV Price in Nepal,10,Twitter,8,Two Wheeler Price,2,Udit Narayan Jha,4,Useful Tools,10,Useful Websites,73,Videcon,1,Wallpapers,4,Windows 8,2,WordPress,2,Xiaomi,6,Yam Chhetri,4,Yamaha,1,YouTube,13,ZTE,1,
ltr
item
GulmiResunga.com: Random Posts Widget For Blogger Blog
Random Posts Widget For Blogger Blog
Random Posts Widget For Blogger Blog
http://3.bp.blogspot.com/-PLaaOH-VQb8/UEMTJ0GN5pI/AAAAAAAADf8/Prvy1SL6K44/s320/Random_post_widget_blogger.PNG
http://3.bp.blogspot.com/-PLaaOH-VQb8/UEMTJ0GN5pI/AAAAAAAADf8/Prvy1SL6K44/s72-c/Random_post_widget_blogger.PNG
GulmiResunga.com
http://www.gulmiresunga.com/2012/09/random-posts-widget-for-blogger-blog.html
http://www.gulmiresunga.com/
http://www.gulmiresunga.com/
http://www.gulmiresunga.com/2012/09/random-posts-widget-for-blogger-blog.html
true
9098666623388878892
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy