Jump to content


How to Add a Facebook “Like” Button to WordPress?

  • Please log in to reply
No replies to this topic

#1 Cryo Kinesis

Cryo Kinesis

    Haphost Staff

  • Moderators
  • 128 posts
  • LocationGridania, Eorzea

Posted 05 August 2014 - 05:37 PM

Hi there,


Now, it is easier than ever to add the Facebook famous “Like”/”Recommend” to your posts and increase their popularity.
First, you need to login as administrator to the WordPress admin panel. 
Then go to Appearance -> Editor.

Then place the following code wherever you want the like button to appear:

<div id=”fb-root”></div>
&ltscript>(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></code>
<div class=”fb-like”  data-href=”http://developers.facebook.com/docs/reference/plugins/like”  data-send=”true” data-width=”450″ data-show-faces=”true”>


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users