How to add Facebook Like Box and change language to local

Facebook Like Box allows website owners to provide their visitors with an easy way to join their facebook community and get updates right in their Facebook news feed with a click to like from their website. It is a good way to promote Facebook Page. Facebook Like Box only works for Facebook Pages, this isn’t working for Facebook Profiles

Adding Facebook Like manually without a plugin

Login to your Facebook account. Go to Facebook Social Plugin’s Like Box page. Provide the URL of your Facebook page and configure the looks of the like box.

There three methods to add Facebook Like Box after we click Get Code button, HTML5, IFRAME and XFBML.


As instruction say there, copy the first part of the code (JavaScriptSDK) and paste it right after <body> tag which is usually found in header.php file, e.g

<div id="fb-root"></div>
<pre><script>// <![CDATA[
(function(d, s, id) {
var js, <span class="hiddenSpellError" pre="" data-mce-bogus="1">fjs</span> = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); = id;
js.src = "//";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// ]]></script>

After that we could copy second part of code underneath first part of code

<div class="fb-like-box" data-href="" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>

This part of the code tells JavaScript SDK that we loaded earlier to display the like box at this location with these parameters.

We are using Text Widget to add Facebook Like Box to sidebar of our site.  Go to Appearance » Widgets. Drag and drop a text widget to your sidebar and paste all inside it. Save the text widget

Facebook Like Box


Iframe is the easiest way to add Facebook Like Box. Drag and drop a text widget to your sidebar, copy iframe code from Facebook Social Plugin’s Like Box and  paste iframe code inside it. Save the text widget. That’s it


Steps to add XFBML almost same with HTML5 method, except for XML Namespace.


Add XML Namespace  to the <html> tag of your  header.php, before <body>

After that, copy first code and third code (JavaScript SDK and fb:like-box) from Facebook Social Plugin’s Like Box and  paste the code inside text widget

Change Facebook Like Box language (localization)


Find following code in JavaScript SDK

js.src = "//";

See en_US in above code, change it to local language


We need to add locale operator to iframe code, e.g

<iframe src="//" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:290px;" allowTransparency="true">

See this part of code above


List of Local Languages for Facebook

Article Name
How to add Facebook Like Box and change language to local
Add Facebook Like Box to WordPress and change default language to local