How to add a facebook like button to a blog post?

Facebook is a very popular social networking site. It is also a very good source of advertisement of your blog post. You can add a facebook like button below the title of your blog post. See an example below:

like

What's the benefit of adding a facebook like button to your blog post? Anyone who clicks this button, ultimately shares your blog post story on their facebook wall or timeline. It means more advertisement and more visits to your blog.

Here is how to add a facebook like button to your blog post:

  • Go to template settings of your blog.
  • Click on ‘edit HTML’ then proceed.
  • Expand Widget Templates.
  • Find this line in template :
<div class='post-header-line-1'/>





  • Now paste this code after above line:




<b:if cond='data:blog.pageType == &quot;item&quot;'>


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


</b:if>





  • Save template and you are done.