By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
BlogbeastBlogbeast
  • Adsense
  • Blogger
  • WordPress
  • Social Media
  • SEO
  • Tips
  • Offbeat
BlogbeastBlogbeast
Search
  • Adsense
  • Blogger
  • WordPress
  • Social Media
  • SEO
  • Tips
  • Offbeat
© 2025 Blogbeast. All rights reserved.
BloggerJavascriptWidgets

How to add Simple Random Post Widget For Blogger

Last updated: 27/08/2022 6:02 PM
By admin

How to install a simple Random post widget on blogger blog – In my previous article, I already described the importance of the Random Post widget. You can read that article here – “Dynamic Random post widget for blogger”. So let’s move on the main topic because I’m not going to waste your time by writing boring things over here.

Before you add this simple random post on your blog, make sure to take a look of this widget by clicking on the below demo button.

After watching the demo of this widget, if you agree with it and want to install this widget, then follow the below simple steps.

At the first, visit to your blogger dashboard, Go to the “Layout” section.

Select “Add a gadget”, Choose Html/JavaScript from the popup menu.

Copy the below Html code and paste it in Html/JavaScript Box.

<ul id="random-posts"></ul>
<style scoped="" type="text/css">
#random-posts{list-style:none;margin:0;padding:0}
#random-posts li{padding:0 0 5px 0;font-size:90%;margin:5px 0;border-bottom:1px solid rgba(0,0,0,0.1)}
#random-posts li a{color:#333;font-size:12px;}
#random-posts li a:hover{color:#e73138;}
</style>
<script type='text/javascript'>
//<![CDATA[
var homePage = "ur_blog_url_here",
numPosts = 8;
function randomPosts(a){if(document.getElementById("random-posts")){var e=shuffleArray(a.feed.entry),title,link,img,content="",ct=document.getElementById("random-posts");for(var i=0;i<numPosts;i++){for(var j=0;j<numPosts;j++){if(e[i].link[j].rel=="alternate"){link=e[i].link[j].href;break}}var title=e[i].title.$t;content+='<strong><li class="random-posts"><a href="'+link+'" title="'+title+'" target="_blank">'+title+'</a></li></strong>'}ct.innerHTML=content}}function shuffleArray(arr){var i=arr.length,j,temp;if(i===0)return false;while(--i){j=Math.floor(Math.random()*(i+1));temp=arr[i];arr[i]=arr[j];arr[j]=temp}return arr}var random_post=document.createElement('script');random_post.src=homePage+'/feeds/posts/summary?alt=json-in-script&orderby=published&max-results=999&callback=randomPosts';document.getElementsByTagName('head')[0].appendChild(random_post);
//]]>
</script>

Replace the above-highlighted URL with your own blog URL.

After that, save the widget, refresh your blog and see the magic.

Read More

10 Best Tips for Indian bloggers – Hindi blogging tips
How To Setup Custom Robots Header Tags In Blogger 2022
How To Completely Install A Blogger Template
How to create a free blog on Blogger in 2022 – Blogging tutorial for beginners
How To Create a Material Design Dialog Box On Blogspot Blogger
Share This Article
Facebook Email Print
YoutubeSubscribe

Popular Posts

What is blogging and how to make money from it?
Offbeat

What is blogging and how to make money from it?

How To Make Money from Blogging
Monetization

8 Fastest ways on How To Make Money from Blogging

What is wordpress plugin
Wordpress

20 Best WordPress Plugins for your Websites in 2022

How to Uninstall Wordpress Plugins manually
Wordpress

How to Uninstall WordPress Plugins completely with Shortcode

What is wordpress plugin
Wordpress

What is wordpress plugin ? How to install WordPress plugin in 4 easy methods?

You Might Also Like

Blogger

How to Divide Post into Pages in Blogspot Blog With Refresh Function

By admin
18/08/2019
Blogger

How to write a post on blogger – Blogging tutorials for beginners

By admin
21/03/2018
Blogger

Show/Hide widgets on mobile

By admin
24/08/2020
BloggerTutorials

Create Privacy Policy Page For Blog To Get Google Adsense Approval

By admin
01/02/2022
Blogger

How to create responsive sitemap static page in blogger 2020

By admin
03/09/2020
How to make a BioLink for Instagram in Blogger
Blogger

How to make a Biolink for Instagram on Blogger

By admin
05/09/2022
Blogbeast

Welcome to BlogBeast, the place where blogging meets earning,and ideas turn into something big.

Quick Links

  • About
  • Contact Us
  • Subscribe

Useful Links

  • Disclaimer
  • Privacy Policy
  • Sitemap
© 2025 Blogbeast. All rights reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?