Black & White Notes

HOW TO: Add Facebook “Like” Buttons to Your WordPress Blog

Posted in life style, WORDPRESS by dimazgyba on May 18, 2010

So Facebook announced this new like button that everyone can implement on the web. This plugin makes it easy to add this button to your wordpress blog. Here is how Facebook describes it

The Like button enables users to make connections to your pages and share content back to their friends on Facebook with one click. Since the content is hosted by Facebook, the button can display personalized content whether or not the user has logged into your site. For logged-in Facebook users, the button is personalized to highlight friends who have also liked the page.

In just the first week, Facebook’s social plugins were integrated into more than 50,000 websites. We expect that number will continue to increase at a rapid rate, especially as businesses and e-commerce sites figure out how to best harness the power of Open Graph.

there is two option that you can choose to plug Facebook like button to you blog/website :

  1. edit your theme files
  2. use a plugin

Although Facebook has ample documentation to help you implement the “Like” buttons onto your own website or blog, it’s still easier on some platforms than it is on others. Posterous and Typepad users, for instance, have “Like” buttons as a built-in option. Today we’re going to look at some of the ways you can implement Facebook’s Like buttons and other social plugins into your hosted WordPress blog or website.

Option One: Edit Your Theme Files

As we will discuss later in the article, there are already dozens of Facebook Like plugins for WordPress available on the web and in the official Plugin Repository. These solutions are certainly the easiest way to add a “Like” button or other social plugins to your site, but they won’t necessarily give you the type of control you can get by just inserting a few lines of code into your theme files.

Why would you want to do this? Depending on your blog or website’s design, you may want buttons or other social information to be displayed in a particular way or in a particular area. While some of the plugins will let you create CSS classes that can then be edited in your theme, for some developers, it might just be easier to add a “Like” button directly to your theme files.

WPBeginner and Devlounge both have good tutorials about how and what code to insert in your theme, but the gist is:

Within your single.php file, in the post loop, add the following line wherever you want the button to appear:

You can adjust the parameters like show_face=true/false and colorscheme=dark/light depending on your preferences. Again, you can see the official Facebook documentation or the two tutorials above for more detailed information.

Option Two: Use a Plugin

This is the option that will be easiest for most users to implement. Right now, there are scads of Facebook “Like” button plugins and other social plugin tools available. It’s great to have options, but it can also make finding the best plugin for your site more difficult.

Here are a few we tried and liked (and to be clear, this is not intended to be an exhaustive or definitive list):

  • Like – This plugin supports multiple languages, gives a number of display options and can be shown at the top or bottom of a post, on pages and on the front page, all based on what settings you select.
  • Facebook Like Button – This plugin has a nice settings panel that makes it easy to see and adjust how you want buttons to appear.
  • Facebook Like Button Plugin – We like that this plugin supports a shortcode, which means that you can indicate what posts to include a button on or not, in the post itself. You can also set default global options.

One plugin that I really like is the Facebook Social Plugins by Olivier Lussier. It has the standard Facebook “Like” button options similar to the other plugins, but it also includes widgets that support other Facebook social plugins.

For instance, you can have a widget that is a “Like” button for any page showing that widget. This is a great option for people who don’t want to have buttons in the bottom or top of their posts but still want people to be able to “Like” an item.

You can also include a “Like Box” for a Facebook Page you have set up. So if you have a Facebook Page associated with your website or company, etc., you can include that box on your website.

Other widgets include an Activity Feed, a Facebook Comments box and a Recommendations listing. These options may need to be customized to fit your individual site or theme, but it makes integrating these social plugins pretty fast and painless


One Response

Subscribe to comments with RSS.

  1. Jaye Sivan said, on May 22, 2010 at 12:26 am

    I want a good easy low cost application to clean against the the do not call list for the telemarketing marketing campaign I will be planning to perform. Does someone know of one?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: