Sticky Social Media Share Bar For Blogger

Sticky Social Media Share Bar For Blogger

At present time share buttons for your blog and their position really matters. They play important role in viraling your contents on social media and increasing your reach. Which will ultimately generate more page views.This share bar remain fixed at the top of your blog even if reader scroll down. When user clicks on share button it displays networks for sharing your posts. It also uses a special conditional tag which makes it appear it only on post pages.

Why share bar for your blog?

  • Compact in design.
  • Better User interface.
  • One click share.
  • No external scripts and css are required.
  • Easy customization.

How to install social media share bar in blogger ?

Step1: Go to Blogger > Theme > Edit html and search for <body expr:class='&quot;loading&quot; + data:blog.mobileClass'> or <body using Ctrl + F.

Step2: Paste below codes below the html body tag.

<b:if cond='data:blog.pageType == "item"'>
<div class='navmob'>
<div class='dropdown'>
<button class='dropbtn' onclick='myFunction()'>Share</button> 
  <div class='dropdown-content' id='myDropdown'>
    <a expr:href='&quot;; + data:blog.url' target='_blank' title='Share On facebook'>Facebook</a>
<a expr:href='&quot;; + data:blog.url' target='_blank' title='Share On twitter'>Twitter</a>
 <a expr:href='&quot;; + data:blog.url' target='_blank' title='Share On Google+'>Google Plus</a>
 <a expr:href='&quot;whatsapp://send?text=&quot; + data:blog.url' target='_blank' title='Share On whatsapp'>WhatsApp</a>
function myFunction() {
window.onclick = function(event) {
  if (!;.dropbtn&#39;)) {
    var dropdowns = document.getElementsByClassName(&quot;dropdown-content&quot;);
    var i;
    for (i = 0; i &lt; dropdowns.length; i++) {
      var openDropdown = dropdowns[i];
      if (openDropdown.classList.contains(&#39;show&#39;)) {

Step3: Now, search for ]]></b:skin> and paste below CSS above it.

.dropbtn {
 border:1px solid #fff;border-radius:5px;
    padding: 5px;margin-left:20px;
    cursor: pointer;
.dropbtn:hover {
.dropdown {
    position: relative;
    display: inline-block;
.dropdown-content {
    display: none;
    position: absolute;    
    overflow: auto;    
    z-index: 9999;
.dropdown-content a {
    color: #fff;
    padding: 10px;z-index: 9999;
    background-color: #000;
    text-decoration: none;
    display: block;
.dropdown a:hover {background-color: #353535}
.show {display:block;}
.navmob {z-index: 9999;
background-color: rgba(0, 0, 0, 0.7);
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);

Step4: Save theme.

No comments:

Post a Comment