Facebook Social Plugins on WordPress – LIKE IT

Posted on

  • email
  • twitter
  • facebook
  • share this

share this

Web marketers looking to further their businesses’ presence on Facebook are turning in droves to the Social Plugins recently offered up by the social networking powerhouse. The group which I predict will have the most immediate rate of adoption is site owners using WordPress.

So how do you add Facebook Social Plugins to your installation of WordPress? The upcoming issue of Website Magazine (professional version only) will provide some detailed guidance but if you are interested in getting started today, the best way to do that would be to add the Facebook “Like” button – and we’re going to show you how. You’re going to be very surprised at how easy this is.

- On each of the individual social plugin pages you are able to retrieve the code. Visit the Like Button reference document and choose the button style, making sure to enter your weblog’s URL.

Editors Note: For the purpose of showing you exactly how to do this, I’ve asked our Senior Editor Mike Phillips to offer up his music blog Sound Citizen as the test environment.

- FB provides the code in an iframe format an in XBFML format (but you’ll need to be using the JavaScript SDK for the latter.

- When you have successfully grabbed the code, you will need to paste it into your blog’s theme file (single.php) where you want the FB Like button to appear.

Now the fun begins.

- Inside the code a reference to the URL can be seen (show in bold below):

- To display the FB Like button, simply change that URL to WordPress’ dynamic URL code ( <?php urlencode(the_permalink()):?> ) like so:

- Save the single.php theme file and you should then see your new Facebook Like Button on every blog post and page.

When someone visits your site who is logged into Facebook and clicks your FB Like button, it will display their name on your site and that they liked it along with being displayed on their profile. 

Login To Comment

Become a Member

Not already a part of our community? Sign up to participate in the discussion. It's free and quick.

Sign Up


Emanuel 04-28-2010 5:10 PM

Added this on my site. It was quite simple, was easily able to discern what each part of the code meant and adjust accordingly.

Thank you for the helpful article.

DebbieH 05-14-2010 1:20 PM

Thanks for the info. Will the "like" show up on facebook pages, too, or just profile?

Add to the discussion!

999 E Touhy Ave
Des Plaines, IL 60018

Toll Free: 1.800.817.1518
International: 1.773.628.2779
Fax: 1.773.272.0920
Email: info@websitemagazine.com