Steps on How To Add Random Posts Widget To Blogger - Sotuntech | Explore the World of Technology

Breaking

Updates Via SMS?? Text FOLLOW Sotuntech to 40404 to Get Them 4 Free
Own A Blog Like This
For Questions, Inquiries, Click Here
Page | Group - Follow us - Call us - Hire Us - 9jatechspot@gmail.com

Tuesday, 6 November 2018

Steps on How To Add Random Posts Widget To Blogger

Having a blog that is easily navigated by the users or readers of such blog is very important. That's why having a widget for random posts that might interest any reader of the blog is a very good way in having a good bounce rates on your blog.

Just like i posted on how to disable copy and paste on your blogger blog, Today, am going to be teaching you a very easy and effective way of adding such a useful widget to your website. Just by following the procedures below, you would be able to achieve it

Step 1: Log in to your blogger dashboard > Go to Layout and select the ADD A GADGET to add your new sidebar gadget.







Step 2: From the pop-up windows choose the HTML/JavaScript.


Also read: How to create table in a blogger post

Step 3: Copy the code below and paste it inside the content box area of the HTML/JavaScript window. Don't forget to put "Recent Posts" in the Title box

<style> #bo-rp-box{float:left;margin-bottom:10px;margin-top:0px;} #bo-rp-box ul{margin:0px;float:left;margin-left:20px;padding:0px;} #bo-rp-box li{vertical-align:middle;list-style:disc outside url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSjCHGvMnEzQMXXznHpW1z94Wu_PpznG90J-OYtXvPU9IR5qCFLMUskr6l6EYJ4M3jr3Ol9L3WehYDazSzOVG-5VB09aoLdIWq00fO7RP5VjKp3ZZLmukRUxvodZJfJIQufM3UmZGdh0Q_/s1600/b1.png"); margin-bottom:0;width:auto;margin-top:0;padding:10px 0;} #bo-rp-box a{color:#0F0F0F;text-decoration:none;font-size:14px} #bo-rp-box a:visited {text-decoration: none;color:blue;} #bo-rp-box a:hover{color:blue} </style> <script> function rp_results_label(r){for(var e=0;e<r.feed.entry.length;e++){var l=r.feed.entry[e];rpTitles[rpTitlesNumb]=l.title.$t;for(var t=0;t<l.link.length;t++)if("alternate"==l.link[t].rel){rpUrls[rpTitlesNumb]=l.link[t].href,rpTitlesNumb++;break}}}function removeRandomDuplicate(){for(var r=new Array(0),e=new Array(0),l=0;l<rpUrls.length;l++)contains(r,rpUrls[l])||(r.length+=1,r[r.length-1]=rpUrls[l],e.length+=1,e[e.length-1]=rpTitles[l]);rpTitles=e,rpUrls=r}function contains(r,e){for(var l=0;l<r.length;l++)if(r[l]==e)return!0;return!1}function showRandomLabels(){for(e=0;e<rpUrls.length;e++)rpUrls[e]==currentposturl&&(rpUrls.splice(e,1),rpTitles.splice(e,1));var r=Math.floor((rpTitles.length-1)*Math.random()),e=0;for(rpTitles.length>1&&document.write("<ul>");e<rpTitles.length&&e<20&&e<maxresults;)document.write('<li><a href="'+rpUrls[r]+'">'+rpTitles[r]+"</a></li>"),r<rpTitles.length-1?r++:r=0,e++;document.write("</ul>")}var rpTitles=new Array,rpTitlesNumb=0,rpUrls=new Array; </script> <div id="bo-rp-box"> <script src="/feeds/posts/default?alt=json-in-script&amp;callback=rp_results_label&amp;max-results=10"></script> <script> var currentposturl=""; var maxresults=6; removeRandomDuplicate(); showRandomLabels();</script></div>
Configuration: 

Change the highlighted 6 to show your desired number of random posts. No other configuration is needed. Simply add it to your blog and enjoy.

You Might also Like: 
  1. How to add table to a blogger post  
  2. Steps on How to Ban or Disable copy and paste on a blogger blog 
  3. Steps On How To Set Up Custom Domain From Whogohost To Blogger Blog 
  4. Steps On How To Stick (Pin) a Post To The Top in Blogger
  5. How To Add Automatic Copyright Year To A Blog Footer 

No comments:

Post a Comment

What do you have to say about this post? Kindly drop your comment(s) here!.. Tick the notify me box to get a notification when you get a response to your comment.. Join Us On Telegram Group here and Whatsapp Group Here For Latest Update and Discussion

We appreciate your comment(s)