Featured templates

How to add Facebook like button in WordPress

Ammy Brown October 3, 2018
Rating: 5.0. From 1 vote.
Please wait...

Facebook is the biggest social network in the world. We will show you how to add FaceBook like button and share article content on the Facebook page. Adding such a button will definitely allow you to promote the website. There are two well-known methods of sharing your website on Facebook.

Adding FaceBook like button using Plugin

This method is recommended for beginners. You will need to install WordPress plugin to enable Facebook like button for your website.

Plugin we recommend using is WP Like Button. The process of plugin installation is very simple. You can install it under Plugins > Add New section in your website back-end.

After the plugin activation visit WP Like Button page in your WordPress back-end. You will see the plugin’s Settings page.

  1. Select where you want to display Facebook like button. Also, decide whether you want to display it on mobiles or not.

  2. Enter your Facebook App ID or an Admin ID of a user who has access to Facebook insights. To get it:

  3. Paste your ID to the App ID field on the WP Like Button Settings page.

  4. Default Image section allows you to upload image that will show on Facebook if an article/post doesn’t have thumbnail, leave it empty to use post thumbnail.

    But if your post has more than one image, incorrect image will be shared or you will have no image displaying. To fix this you can use the Yoast SEO plugin.

    • Navigate to SEO > Social page and click Facebook tab.

    • Make sure Add Open Graph meta data option is enabled.

Insert FaceBook like button manually

This method requires some code knowledge. To enable it manually:

  1. Visit Facebook developer Like button page

  2. Locate Like Button Configurator section at the bottom of the page.

    You can manage Facebook like button appearance here. Change its layout, action type, size, etc. This section allows you to preview the button.

  3. After changing preview to your needs click Get Code button.

  4. You will see popup window with 2 boxes of the code under the JavaScript SDK tab. Copy the code from the 1st box.

  5. Edit the header.php file under Appearance > Editor page in your backend. Add the code you copied previously after the <body> tag.

  6. Now copy the 2nd piece of the code and paste it to your theme’s files where you want to display the Like button. The most likely, you will add it to single.php, meta.php, page.php. The exact file name depends on the theme you use.

That is it! You know how to add Facebook like button in WordPress now. If any questions don’t hesitate to contact us. We will be glad to assist you.

This entry was posted in Monstroid Tutorials, WordPress Tutorials and tagged Facebook, Facebook like button. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket