26 Jan 2012

How to Add Social Share Buttons (with count) to Top of Post in Blogger

I really enjoy doing all these blogger tutorials and I hope you guys are finding them useful. Today I'm bringing you another tutorial and this one will show you how to add social media buttons to the tops of your posts. The buttons also count how many times your content has been shared. They include Facebook, Twitter, Stumble Upon and Digg.

 



 

So let us get down to the nitty gritty.

First of all navigate to Dashboard-Template-Edit HTML-Proceed and tick on the box at the top called Expand Widget template.

 

Find the following line of code:

]]></b:skin>


Paste the code below above that line.


.social-bar { border: dashed #ddd; border-width:1px 0 1px 0; margin: 10px auto 10px; display:block; padding: 3px 0 1px 0px; overflow: hidden; }
.social-bar .social_button {float: left; display: inline; overflow: hidden; height:22px; }
.social-bar .social_button.dg { margin: 0px 0 0 20px ; padding-top: 2px;}
.social-bar .social_button.tm { margin: 0px 0 0 20px; padding-top: 4px;}
.social-bar .social_button.fb { margin: 0 0 0 20px; padding-top:3px;}
.social-bar .social_button.su { margin: 0px 0 0 20px; padding-top: 2px;}
.social-bar .social_button.buzz { margin-left:20px ; padding-top: 3px;}


Now find the following line of code:


<div class='post-header'>


Paste this code underneath it:


<b:if cond='data:blog.pageType == &quot;item&quot;'><div class='social-bar'>
<div class='social_button dg'>
<a class='DiggThisButton DiggCompact'/><script src='http://widgets.digg.com/buttons.js' type='text/javascript'/>
</div>
<div class='social_button tm'>
<div style='float:right;width:90px;height:25px'>
<a class='twitter-share-button' data-count='horizontal' data-via='technowit' href='http://twitter.com/share'>Tweet</a><script src='http://platform.twitter.com/widgets.js' type='text/javascript'/></div>
</div>
<div class='social_button fb'>
<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;action=like&amp;font=verdana&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:80px; height:27px;'/>
</div>
<div class='social_button su'>
<script src='http://www.stumbleupon.com/hostedbadge.php?s=1'/>
</div>
<div class='social_button buzz'>
<a class='google-buzz-button' data-button-style='small-count' href='http://www.google.com/buzz/post' title='Post to Google Buzz'/>
<script src='http://www.google.com/buzz/api/button.js' type='text/javascript'/>
</div></div></b:if>


Hit Save. You should now have social media share buttons at the top of your posts :)

Related Posts:

  • Blogger Tutorial - How to Add Rounded Edges to Your Profile PhotoI recently received a request to do a Blogger Tutorial  on how to change the Blogger profile photo from straight edges to round edges. It is actually very very simple. It is basically a one step process. First of all let me s… Read More
  • SEO Part 3 - Link Building Links are especially important in SEO. Search engines assume that the more sites that link to you, the more popular a site. And as I said in Part 2 popularity can mean you receive a higher ranking. So building links is … Read More
  • How to Use Firebug to Design Your BlogIf you want to improve your design but not sure of the html and don't wanna mess with your code while trying things out the Firebug is for you. Firebug is a browser extension that is totally free and available for Chrome or F… Read More
  • SEO Part 4 - KeywordsI spoke a little about the importance of keywords in part 2 but now I'm going to delve a bit deeper into the world of keywords.Keywords are the most important aspect of SEO. Choosing the correct ones is imperative for high ra… Read More
  • SEO Part 2 - Design, Link Structure & Keywords In Part 2 of my guide to SEO we're going to look at how your site's design can influence your search results & lots more.Search engines aren't manned by human beings so they don't view the content in the same way as… Read More

6 comments:

  1. How to Add Social Share Buttons (with count) to Top of Post in Blogger http://t.co/XasjcfeO

    ReplyDelete
  2. SO COOL!! I just tried this but there was some kind of error... I'm sick of staring at my screen so I'll try again later. :) Thank you!!

    ReplyDelete
  3. I tried this but couldn't find the



    bit of HTML. is there any way to search through html to locate it do you know?
    Thank you

    www.fayebag.blogspot.com

    ReplyDelete
  4. you can use ctrl+f to find the code. just type the code your looking for into the box at the bottom and press enter :)

    ReplyDelete
  5. Great post only thing is I got the following error.

    Error parsing XML, line 1185, column 12: Open quote is expected for attribute "{1}" associated with an element type "cond".

    ReplyDelete