Add floating social media sharing buttons below Blogger post titles

It is becoming increasingly important to make our posts appreciated and shared on social networks and one of the best ways to get traffic to...

It is becoming increasingly important to make our posts appreciated and shared on social networks and one of the best ways to get traffic to our blog or site and boost sharing stats is to add social sharing buttons.

In this tutorial we will see how to add a floating social media sharing bar below the title of Blogger posts, so when a reader scrolls down the page, he will still be able to see the sharing buttons without having to scroll back to the top.

floating social media for blogger
Adding the below jQuery script will make the buttons float in a fixed position as soon as they reach "the top" of the page. By scrolling back, the buttons will return to their initial position. The social sharing bar includes buttons for Facebook, Twitter, Google+, and Pinterest.

Social Media Sharing Buttons below Blogger Post Title

  1. From the Blogger Dashboard, go to "Template" and click on the "Edit HTML" button:

  2. Click anywhere inside the code area and press the CTRL + F keys to open the search box. Once you see the search box, type the </head> tag inside the search box and hit Enter to find it.

    blogger search box, ctrl + f
  3. Just above </head> add this script:
    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'/>

    <script type='text/javascript'>
    //<![CDATA[
    $(function() {
    var $movesbuttons = $("#floating-social-buttons"),
    $window = $(window),
    offset = $movesbuttons.offset();
    $window.scroll(function() {
    if ($window.scrollTop() > offset.top) {
    $movesbuttons.css({'position' : 'fixed', 'width' : '550px', 'top' : '0px'});
    } else {
    $movesbuttons.css({'position' : 'absolute', 'top' : 'auto'});
    }
    });
    });
    //]]>
    </script>
  4. Now before the ]]></b:skin> tag (press CTRL + F to find it) add the following CSS styles:
    #floating-social-buttons {
    padding: 6px 0px 12px;
    position: absolute;
    background: #F6F6F6;
    border-bottom: 1px solid #DEDEDE;
    width: 550px;
    height: 18px;
    z-index: 99;
    }
    .floating-social-buttons {
    margin-left: 5px !important;
    }
    .floating-social-buttons li {
    float: left;
    margin-left: 5px;
    list-style:none;
    }
    To change the width of the bar, modify the 550px values in red. Note that this value also appears in the script which also needs to be modified
  5. Finally, just below the second <div class='post-header'> (press CTRL + F and hit Enter twice to find the second one) add the following code:
    <b:if cond='data:blog.pageType == &quot;item&quot;'>
    <div style='padding:5px 0 35px 0;clear:both;'>
    <div id='floating-social-buttons'>
    <ul class='floating-social-buttons'>

    <li><iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url+ &quot;&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;height=25&amp;action=like&amp;font=tahoma&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:100px; height:25px;'/></li>

    <li><a class='twitter-share-button' data-lang='en' href='https://twitter.com/share'>Tweet</a><script src='//platform.twitter.com/widgets.js' type='text/javascript'/></li>

    <li><script src='http://apis.google.com/js/plusone.js' type='text/javascript'/><g:plusone expr:href='data:post.url' size='medium'/></li>

    <li><a class='pin-it-button' count-layout='horizontal' expr:href='&quot;http://pinterest.com/pin/create/button/?url=&quot; + data:post.url + &quot;&amp;media=&quot; + data:post.thumbnailUrl + &quot;&amp;description=&quot; + data:post.snippet' style='margin:0 10px 5px 0;'>Pin It</a> <script src='http://assets.pinterest.com/js/pinit.js' type='text/javascript'/></li>

    </ul>
    </div>
    </div>
    </b:if>
  6. Click on the "Save template" button and you're done :)

Customizing the Floating Social Media Sharing buttons

  • If you want the buttons to appear at the end of the post, paste this code before or after <div class='post-footer'>
  • If the bar overlaps with the post content, then change 35px to a higher value.
So these were the steps for adding the horizontal social buttons bar on Blogger. Using this bar it is also useful as it could help you to get more social traffic for your blog.

COMMENTS

HawkHost Sale 25% Ending Soon

SaibABC's Contact Form:

Name

adsense,10,adsense optimization,4,adsense tips,5,Amp,3,backlinks,2,Beautiful,26,Beautifully,3,Beauty,15,beginner's guide,12,Blog Design,57,Blogger,22,blogger pages,4,blogger posts,11,blogging tips,3,Bolero Hot,13,click bombing,1,Comedies,10,Comedy,8,Comments,9,css,27,Cuisine,32,Cuisines,39,custom domain,2,Dab Neeg,6,DabNeeg,36,Facebook,4,Fashion,27,Fighting,12,firebug,1,font awesome,1,GoodTrick,58,google analytics,1,google plus,4,Grid Style,17,HealthLife,57,Hmong Health,11,Hmong Music,6,homepage,1,how to,54,Hunting,55,Image Effects,13,Information,17,instagram,2,Instrument,5,invalid clicks,1,javascript,10,jQuery,16,KabTxuj,28,Karaoke,19,Karaoke Hit,12,labels,2,Liste Style,6,make money online,8,menus,7,Movie Hot,37,Movies,18,Music Hot,41,Musical,100,Navigation,5,navigation menu,5,Other Clips,6,popular posts,5,posts,11,recent comments,1,recent posts,3,related posts,3,robots,1,Sad Songs,17,SEO,16,sitemap,1,slideshows,3,social media,8,social media plugins,4,statcounter,1,static pages,2,Technology,17,Template,12,Templates,7,threaded comments,3,tools,1,Travels,1,Video Fight,7,Video Hot,22,Video Hunt,30,Widgets,47,Xov Xwm,2,
ltr
item
SaibABC - News, HealthLife, Beauty, Tips: Add floating social media sharing buttons below Blogger post titles
Add floating social media sharing buttons below Blogger post titles
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk8LakWsTTBwGfOaYP7tD-R6GmECZKFhAnKKA9-wk3ipfpurq-9gCzHFrrIKzysvZa2cMV1KRokRVzpMPvMcCfQiqabNlSHKR2fd3wli9OkpI0lYbspqnWU19mngDQPph_CwnAUqoo1kPJ/s1600/floating-social-media-sharing-bar-for-blogger.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk8LakWsTTBwGfOaYP7tD-R6GmECZKFhAnKKA9-wk3ipfpurq-9gCzHFrrIKzysvZa2cMV1KRokRVzpMPvMcCfQiqabNlSHKR2fd3wli9OkpI0lYbspqnWU19mngDQPph_CwnAUqoo1kPJ/s72-c/floating-social-media-sharing-bar-for-blogger.jpg
SaibABC - News, HealthLife, Beauty, Tips
https://saibabc.blogspot.com/2021/02/add-floating-social-media-sharing.html
https://saibabc.blogspot.com/
https://saibabc.blogspot.com/
https://saibabc.blogspot.com/2021/02/add-floating-social-media-sharing.html
true
7959548849429202663
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