How to Add the Facebook "Like" Button to Blogger or WordPress

Facebook is currently the largest social media network on the Internet. Odds are your readers have a profile and can immediately start sharing your content with their friends and family. So, how can you get your readers to sing your praises without forcing them to do so? Simple. Install the Facebook “Like” button on your blog.

When visitors to your blog click the "Like" button on your post, they share your content on their Facebook wall—instant advertising. You want more readers, more site traffic, and more exposure? This is a great way to do it.

Facebook Like Button

Thankfully, Facebook has made adding the "Like" button to a webpage incredibly user friendly. You don’t need to be coding guru to install this!

For Blogger Users

  1. Open your blog's dashboard.
  2. Click on Theme. Click on the down arrow next to Customize.
  3. Click on Edit HTML.
  4. Click in the work area of the HTML editor, press Control+F key combination and find this code using the HTML editor's find function: <data:post.body/>. This is the code for your post body. This code may be present 2 or 3 times in your template so you will need some trial and error to find the right one if you are not aware of which one displays post body on individual posts.
  5. To locate the right "<data:post.body/>", copy and paste the code given below right after it. Pasting the code and saving the template should display the Like button on each post page.
  6. <b:if cond='data:blog.pageType == &quot;item&quot;'><iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;layout=standard&amp;show_faces=false&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:40px;'/></b:if>
  7. Click on Save Template.
  8. You can modify the location to paste the code to change the location of the Like button according to your need.

Facebook Like
Adding Facebook Like button to WordPress

The three ways to add the Facebook “Like” button to your blog are:
1. Using a plugin
2. Going directly to Facebook
3. Manual coding

Using a WordPress Plugin

WordPress Plugins are strings of code that have been created to expand the functionality of the software application. You can choose from hundreds of different WordPress plugins to add a Facebook Like button to your blog. The best approach is to review the documentation and user ratings of a plugin before adding it to your blog. However, keep in mind that a 3rd party plugin may limit the customization you can apply to the appearance and location of the Like button on your site.

Facebook Like WordPress Plugin

Benefits:
  1. Don’t have to deal with code at all.
  2. Depending on the plugin you choose, the Like button could be bundled with a number of other social buttons, minimizing the amount of time and effort you have to put into tracking down buttons for each service you want to connect to.

Going Directly to Facebook

Facebook has its own tool for creating a Like button using Extended Facebook Markup Language (XFBML). The Like button creator can be found at Facebook's Developers page. You need to have some coding experience if you want to modify the code to suit your needs (like having each page's URL getting detected automatically and selecting the location of the like button).

Benefits:
  1. XFBML was developed to work specifically with Facebook so it has some great bells and whistles, including real-time reports on when users click the Like button and providing users with the ability to add comments when clicking the button.
  2. The knowledge that your code will be correct.

Manual Coding

If you have experience with PHP code editing, you can manually add the Facebook Like button to your WordPress blog. If you don’t know how to code but would like to learn how, the internet offers several free resources.

Benefits:
Offers the most control and customization of how buttons/social information displays.

All bloggers should consider installing the Facebook Like button on their blog. It doesn’t take any longer than 20 minutes to install, and it provides a quick and easy way for your readers to share your content.

Author About

Akhilesh Sharma maintains and writes Tweak And Trick. He is a technology enthusiast and a science student.
You can contact him at tweakandtrick@gmail.com.

read more >>
Featured Posts