Add a like button HTML/Blogger

You may want to add a like button to your website or blog... here's how you do it.

The source html: <div class="fb-like" data-href="http://pelictech.blogspot.com/" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true"></div>

Make sure to change the link!

Somewhere on your website/blog put this in the html:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

In Blogger:

for a gadget:

Click layout>add new gadget>html/javascript

paste the html and click save.


above every post:

Go to template>edit HTML

Click Go to widget>Blog1

Click the arrow next to it, then click the arrow next to "<b:includable id='main' var='top'..."

Find the second
"<b:if cond='data:post.isDateStart'>

        &lt;div class=&quot;date-posts&quot;&gt;
</b:if>
and post the HTML after that. Click save template.


On a Website:

Paste the HTML on the page where you want the Like/Share button.


No comments :

Post a Comment

Please -- leave comments related to this post only.