If you want to add Facebook Like button on your WordPress site, then you have come to the right place. It is very simple and easy to add the Facebook Page Like Button on WordPress Site. In this tutorial, we will teach you quickly how to add your Facebook Page like button on the WordPress site.
There are many ways to add Facebook like box on WordPress site. You can either add Facebook like button manually (without plugin) or by using a plugin. In this tutorial, we have covered both the parts.
Why Should You Add Facebook Like Button on Your Site or Blog?
Facebook is the biggest Social networking platform and it has more than 2 billion monthly active users. Therefore, to increase your site traffic quickly, it is one of the effective platforms. Once you add ‘Facebook Like Button’ on your WordPress site, your site visitors don’t have to find the official Facebook page on Facebook. They can directly like and follow your Facebook page on your site. It will help you to increase Facebook followers much faster. So, to promote your business or blog, it is important to add Facebook Like button on your blog or website.
Method 1: Adding Facebook Like and Share Button on WordPress Manually
Step 1: Configuration of Facebook Like Button
- Go to the Facebook developer page then select the Like button from the left menu bar.
- Scroll down to the Like Button Configurator section.
- In the Like Button Configurator section, enter your Facebook page URL and choose the layout, button size, Action Type, and Width.
- Next, click on the ‘Get Code’ button.
Step 2: Get Facebook Like Button Code
Once you will click on the Get Code button, a new popup window will open with two pieces of code (see the picture below).
Step 3: Copy and Paste the Facebook Like Button Code in Your WordPress Site
- Copy the first piece of code & paste it just after the <body> tag.
To find the body tag, navigate the Appearance >> Editor section of your theme. Under the editor section, open the header.php file. Paste the code just after <body> tag and then click on the Update File button to save the changes.
- Copy the second piece of code & paste it wherever you like to show the Facebook like button. For example, you may want to show it the theme’s Footer, page.php, sidebar.php, single.php.
If you are not familiar with the editing of theme PHP file, then we strongly recommend not to do it yourself. However, there is another way to add Facebook like button on WordPress site using Widgets. To do this, follow the steps below.
1. Switch back to the Like Button Configurator section again.
2. Click on the Get Code button.
3. Copy the Facebook Like Button code from the IFrame section (shown in the picture below).
4. Go to the WordPress dashboard and navigate to Appearance >> Widgets section.
5. Under the Widgets section, drag a text widget to the sidebar section or footer section wherever you want to add FB like button on your WordPress site.
6. Paste the code in the text box Widget and save it.
Now your job is done! If you want to add the like button in the footer section, you have to insert the code similarly in the footer section.
Method 2: Adding Facebook Like Box on WordPress Site Using a Plugin
You can easily add Facebook like box on your WordPress site using a plugin. There are plenty of free plugins available and you can use anyone you like.
In this article, quickly we will show you how to add Facebook like button using the WP Advanced Facebook Like Box plugin. If you are a beginner, then strongly recommend you to use this plugin. To install and set-up this plugin, follow the steps below.
Step 1: Install WP Advanced Facebook Like Box plugin
1. Login to your WordPress dashboard.
2. Navigate to Plugins >> Add New section.
3. Search for WP Advanced Facebook Like Box plugin using the plugin search box at the upper right corner.
4. Locate WP Advanced Facebook Like Box from the search results and install it.
5. After installation, click on the Activate button on the same screen
Step 2: Facebook Like Box Plugin Settings
1. Navigate to Settings >> FB Like Box on your WordPress dashboard
2. Under the general settings section of FB Like Box plugin, enter like box title, Facebook page URL, border color, height, width, etc. Before putting the width, check what is the maximum width of your sidebar. If you don’t know the width, then keep it empty. It will automatically use the default width and height. According to plugin description, 292px width and 210px hight give the best output of Facebook Like Box.
3. After entering all the details, click on the Save button.
This plugin also offers many other options. You can easily insert Facebook like box on your WordPress posts. Also, if you like you can auto popup of FB Like Box using Auto popup settings.
Step-3: Adding Facebook Like Box to Sidebar, Footer / or any Widget Areas
1. Go to Appearance >> Widgets on your WordPress dashboard.
2. Add ‘Facebook Like Box’ Widget and Add it to Sidebar, Footer, or any other widget Areas.
4. If you want to display the like box in specific posts and pages, you just need to paste [cardoza_facebook_like_box] shortcode. If you want to specify a different width and height, then you need to use [cardoza_facebook_like_box width=”500″ height=”200″] shortcode.
Now your job is done! We hope that you have successfully added the FB Like Box on your site using the WP Advanced Facebook Like Box plugin.
There are many other plugins also available for Facebook like button. Some of them are listed below.
- WP Like Button
- Easy Facebook Like Box (Facebook Page Plugin) – Custom Facebook Feed – Auto PopUp
- Facebook Widget
- Easy Facebook Like Box
Sometimes Facebook Like box may slow down your site. You have to check your site speed before and after adding a like button. Make sure that your site speed is not dramatically affected after adding Facebook Like box. For more information, if you are are using WP Rocket, your site speed will not affect after adding like button as WP Rocket hosts Facebook Pixels locally on your server to satisfy the PageSpeed. No other cache plugin will able to solve this issue.
We hoped that from this article, you have learned how to add Facebook Like button/box on your WordPress site. If you have any further questions, write in the comment box below.