Notification texts go here Contact Us All Tools!

How to Add Random Post Button Widget in Blogger site

As a blogger, one of your goals is to provide a great user experience for your readers. Adding a Random Post Button Widget on your website can help your readers discover new content that they might have missed. It's a great way to engage your audience and keep them on your website for longer. In this article, we will show you how to add a Random Post Button Widget in Blogger website.

How to Add Random Post Button Widget in Blogger Website

Why add a Random Post Button Widget to your Blogger website?

There are several reasons why you should consider adding a Random Post Button Widget to your Blogger website:

  1. It helps to increase engagement on your website. When readers click on the Random Post Button, they will be directed to a random blog post, which they might have missed before. This helps to keep your readers on your website for longer, which is good for your SEO.
  2. It provides a fun way for your readers to discover new content. Sometimes readers might not know what they are looking for, but by clicking on the Random Post Button, they might discover something that they like.
  3. It encourages readers to explore your website. By providing an easy way for readers to navigate through your website, they are more likely to explore and discover more content.

How to Add Random Post Button Widget in Blogger Website in 6 steps

Step 1: First, copy the full code of 'Random Post Button' from the code box below.

Step 2: Then you have to go to the dashboard of the blogger website.

Step 3: You need to enter the layout option of the desboard.

Step 4: Then click on 'Add a Gadget' and

Then click on 'HTML / JavaScript' in position 4.

Step 5: Now you need to paste the copied code below the Content of 'Configure HTML / JavaScript'.

Step 6: Click on the Save button to finish the process.

How to Add Random Post Button Widget code


<style>

#mironiyar-random{position:relative;color:rgba(255,255,255,1);text-decoration:none;background-color:rgba(219,87,5,1);font-family:'Yanone Kaffeesatz';font-weight:700;font-size:20px;display:block;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-box-shadow:0 9px 0 rgba(219,31,5,1), 0 9px 25px rgba(0,0,0,.7);-moz-box-shadow:0 9px 0 rgba(219,31,5,1), 0 9px 25px rgba(0,0,0,.7);box-shadow:0 9px 0 rgba(219,31,5,1), 0 9px 25px rgba(0,0,0,.7);margin-bottom:10px;margin-top:10px;width:160px;text-align:center;-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-ms-transition:all .1s ease;-o-transition:all .1s ease;transition:all .1s ease;padding:4px}

#mironiyar-random:active{-webkit-box-shadow:0 3px 0 rgba(219,31,5,1), 0 3px 6px rgba(0,0,0,.9);-moz-box-shadow:0 3px 0 rgba(219,31,5,1), 0 3px 6px rgba(0,0,0,.9);box-shadow:0 3px 0 rgba(219,31,5,1), 0 3px 6px rgba(0,0,0,.9);position:relative;top:6px}

#mironiyar-random a{color: #fff;}

</style>

<center><div id="mironiyar-random"></div></center>

<script type="text/javascript">

function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == 'alternate'){window.location = entry.link[j].href;}}} function fetchLuck(luck){ script = document.createElement('script'); script.src = '/feeds/posts/summary?start-index='+luck+'&max-results=1&alt=json-in-script&callback=showLucky'; script.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(script); } function feelingLucky(root){ var feed = root.feed; var total = parseInt(feed.openSearch$totalResults.$t,10); var luckyNumber = Math.floor(Math.random()*total);luckyNumber++; a = document.createElement('a'); a.href = '#random'; a.rel = luckyNumber; a.onclick = function(){fetchLuck(this.rel);}; a.innerHTML = 'Random Post'; document.getElementById('mironiyar-random').appendChild(a); } </script><script src="/feeds/posts/summary?max-results=0&alt=json-in-script&callback=feelingLucky">

</script>

Frequently Asked Questions (FAQs)

What is a Random Post Button Widget?

A Random Post Button Widget is a button that, when clicked, directs readers to a random blog post on your website.

Why should I add a Random Post Button Widget to my website?

Adding a Random Post Button Widget can help to increase engagement on your website, provide a fun way for your readers to discover new content, and encourage readers to explore your website.

Can I customize the Random Post Button Widget?

Yes, you can customize the Random Post Button Widget. You can modify the HTML and CSS code to change the button's color, font, size, and other visual elements to match your website's style.

Do I need any coding knowledge to add a Random Post Button Widget to my Blogger website?

Yes, you will need some basic knowledge of HTML and CSS to add a Random Post Button Widget to your Blogger website. However, the code provided in this article is simple and easy to understand, so you don't need to be a coding expert to add the widget.

Adding a Random Post Button Widget to your Blogger website can provide a fun and easy way for your readers to navigate through your website and discover new content. By following the steps outlined in this article, you can easily add the widget to your website and customize it to suit your website's style and branding. Remember to test the widget after adding it to your website to ensure that it's working correctly. We hope this article has been helpful in showing you how to add a Random Post Button Widget to your Blogger website.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.