Do you want to add Facebook like button to WordPress?
Social networks play an important role in increasing traffic to your website and currently, Facebook is the world’s most popular social networking platform.
Adding Facebook like button to your WordPress website, you can allow your visitor to like and share your website easily.
In this handy guide, I’m going to share two best and easy ways to add Facebook like button to WordPress. You can use any method.
So let’s get started…
How to Add Facebook Like Button to WordPress
By default, WordPress does not allow adding FB like button to your WordPress site. You need to use a plugin or the Facebook developers website. Here, I’m going to cover both methods.
1. Add Facebook Like Button Using Plugin
First, install and activate the WP Like Button plugin on your site.
Once activated, it will add a new menu item “WP Like Button” in your WordPress dashboard. Just click on it. This will take you to the plugin’s Settings page.
Here you can choose, where you want to display Facebook page like button to your blog or website and do you want to show the Facebook like button on mobile devices.
After this, enter your Facebook App ID or the user Admin ID.
Then you need to select “Every page/post will have its own button” in the section “What to like”. You need to choose a layout, alignment, language for your Facebook like button.
Once you’re done, click on the Save Settings button.
Now visit your website to check Facebook like button.
2. Add Facebook Like Button Without Plugin
First, visit Facebook developers website and login then click on the “Like Button Configurator” button and scroll down.
Here you can customize Facebook button layout and size. This will show you a live preview of your Facebook button.
Leave the URL field blank and click on the “Get Code” button when you finish setting.
Now a new popup will open with the code snippets. As you can see in the screenshot.
Copy the first code snippet and paste it after the opening body tag in your WordPress theme.
After this, copy the second code snippet and paste it into the template files of the WordPress theme where you want to display the Facebook like button.
Maybe you want to add it to single.php, archive.php, page.php, etc. If you have content templates in your WordPress theme, add it to content templates.
Note: When you paste these code snippets directly into WordPress theme and update the theme, they will be overwritten.
If you want to add Facebook page like button to your site, then I recommend the first method. It’s very easy and anyone can easily add FB like button.
Have any thoughts regarding this tutorial? We’d love to hear what you think about it.
Find this article helpful? Don’t forget to share!