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.
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.
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.
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’.
Now, write your title for the sidebar Widget, and copy the code in the text box.
Click ‘Save and Publish’, and you’re done! You now have a Facebook Like button in your sidebar!