How to add a Facebook like button to your WordPress website sidebar

By | February 16, 2015

In this article you’ll learn how to add a button to like your Facebook page to the sidebar of your WordPress website.

First off, go to developers.facebook.com/docs/plugins/like-button.

Button options

Here you’ll find a box with options to configure your Facebook page like button.

  • URL to Like: find your Facebook page url, and copy it here. To get an idea what this url looks like; mine is: https://www.facebook.com/pages/IMstartpage/1531478823803639.
  • Width: Find out what the width of the content in your sidebar is, and add this in this box. Mine is 300 pixels wide.
  • Layout: You can select four different layouts in the Layout drop-down menu; standard, which shows the Like and Share button, as well as a short text that tells you how many likes the page has, as well as which friends like the page. Box_count, which shows the Like and Share button, with a text balloon with the amount of likes the page currently has, all stacked un top of eachother. Button_count shows the same, but with the buttons and text balleen next to eachother. Button only shows the Like and Share button, both next to eachother.
  • Action type: Here you can choose betweeen ‘like’ and ‘recommend’. The function is the same; it lets the user ‘like’ something on Facebook. The only difference is the text on the button.
  • Show Friends’ Faces: Leave this box checked if you want to display a tiny thumbnail of the viewers Facebook friends that like your page, or uncheck it if you want to disable this function.
  • Include share button: Leave this box checked if you want to also display the Share button, or uncheck it if you want to only show the Like button.

A preview of your button(s) is shown in the box below these options.

Facebook-Like-button-Wordpress

Getting the Code for your like button

Once you’ve got all the options set up, click ‘Get Code’, to get your code to add to WordPress.

Click on ‘IFRAME’, and copy the code.

Facebook-Like-button-Wordpress-Get-code

Adding it to your WordPress sidebar

Go to your WordPress website, and click ‘Appearance’, then ‘Customize’. Here, click ‘Widgets’, ‘Main Sidebar’.

Here, click ‘Add a Widget’, then scroll down and click ‘Text’.

Facebook-Like-button-Wordpress-Add-Widget

Now, write your title for the sidebar Widget, and copy the code in the text box.

Facebook-Like-button-Adding-to-sidebar

Click ‘Save and Publish’, and you’re done! You now have a Facebook Like button in your sidebar!

The result:

Facebook-Like-button-added

Links

Get the code: developers.facebook.com/docs/plugins/like-button
How to create a Facebook business page
See who likes your Facebook business page

Other social buttons:
How to add a Google Plus follow button to your WordPress website
How to add a Twitter Follow button to your WordPress website

One thought on “How to add a Facebook like button to your WordPress website sidebar

  1. David

    Hi Guido

    Facebook is the top social networking site growing day by day and people are using it on the regular basis.

    Facebook is really a great source for the bloggers. Many bloggers on the BLOG-O-SPHERE used Facebook to promote their product or brand and getting tons of daily readers from it.

    Integrating Facebook like button will help us to drive more traffic from Facebook. I had launched my new site recently that’s why I was looking for Facebook like button.

    But now I know what I have to do.

    You have written awesome article. Thanks for sharing it with us. :D

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*