Social networks are great for driving traffic to your website. Thus it’s important to make your website easy to like and share for your visitors. In this tutorial you will learn two different ways to add Facebook like button to WordPress blog.
Table of Contents
What you’ll need
Before you begin this guide you’ll need the following:
Option 1 — Adding Facebook Like Button to WordPress With Plugin
The easiest way to add Facebook like button to WordPress blog is to use plugins. Steps below show how to install and activate Facebook Button by BestWebSoft plugin:
- Access WordPress admin dashboard and navigate to Plugins -> Add New section. Enter
facebook button by bestwebsoftin the search field and hit ENTER. Locate Facebook Button by BestWebSoft and press Install Now button next to it. Click here if you need more detailed instructions how to install plugins.
- Once the installation is completed, activate the plugin by pressing Activate Plugin button.
- Now it’s time to configure the plugin. Access plugin settings page by navigating to BWS Panel -> Facebook Button.
- On the settings page, configure Facebook like button to suit your needs. For example, you can set where to show like button, its language and position.
- Once the configuration of the Facebook like button is complete, navigate to any page / post you have or create a new one and insert like button by pressing Add BWS Shortcode button.
- Press Insert button again and the button will be inserted.
Congratulations, you have successfully added Facebook like button to your WordPress blog.
Option 2 – Adding Facebook Like Button Manually
If you are familiar with WordPress file structure, you can manually add facebook like button to WordPress. However, this option requires PHP files to be edited. Therefore, it’s highly recommended to make a backup of your WordPress website first.
Follow steps below to manually add Facebook like button:
- Access your WordPress dashboard and navigate to Appearance -> Editor section.
- On the right side of the screen you can see editable files. Choose where you want Facebook like button to appear. In this tutorial, it’s chosen to place like button at the bottom of the page. Therefore, footer.php file was edited.
- Copy the following code and add it into PHP file.
<iframe src="http://www.facebook.com/plugins/like.php?href= <?php echo urlencode(get_permalink($post->id)); ?>&layout=standard& amp;show_faces=false&width=350&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" ></iframe>
This is how footer.php looks like after code is inserted:
- Press Update File button to save changes.
- Visit front-end of your WordPress blog and check how it looks. If the final view is not the one you expected, remove the code and insert it in a different place.
You have learned two different ways to insert Facebook like button to your WordPress blog. Both of them require none or very less coding knowledge. Such simple things like a Facebook like button can help you improve your website popularity and drive more visitors.