2 Easy ways to add Facebook like button in WordPress

Do you want to add Facebook like button to WordPress? Currently, Facebook is the world's most popular social platform. Social networks play an important role in increasing traffic to your website. Using Facebook like button, you can allow your visitor to like and share your website easily.

In this tutorial, I'm going to share two best and easy ways to add Facebook page like button to WordPress. You can add Facebook like button to your site using any method.

How to Add facebook page like button to WordPress Blog

How to Add Facebook Like Button to WordPress


By default, WordPress does not allow adding FB like button to your site. For this, you need to use a plugin or the Facebook developers website. Here, we are going to cover both methods.

1. Add Facebook Like Button Using Plugin


First, install and activate the WP Like Button plugin on your site. Click here to see 3 different ways to install WordPress plugin.

After activating the plugin, 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.

How to Add facebook page like button to WordPress Blog

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 configuring the settings, click on the Save Settings button.

Now visit your WordPress blog or 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 the Facebook button.

Leave the URL field blank and click on the "Get Code" button when you finish setting.

Adding Manually facebook page like button to WordPress

Now a new popup will open with the code snippets. As you can see in the screenshot.

Adding Manually facebook page like button to WordPress

Copy the first code snippet and paste it after the <body> tag in the header.php file of 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, then add it to content templates.

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!

Comments

Popular posts from this blog

Fix Submitted URL marked ‘noindex’ in Google Search Console Tool 2018

Keep these 12 things in mind before applying to Google AdSense

What is Google Adsense and How much you can make money