April 22, 2010

How to: Add the Facebook 'like' button to WordPress

Facebook have launched a new suite of Social Plugins. The changes are huge and I won’t go into them here, you can check that out on their developers website.

The new ‘like’ button is great for bloggers. It is faster, still allows users to add comments and, according to Facebook, users are more likely to ‘like’ something than share the link (at the end of the day the result is the same, you show up in their feed).

Sadly, the Facebook Developer tool to create Like buttons  is not as simple as the Share Button for novices. If you are wanting users to be able to like each individual page / post on your website here is how you do it:

Step One: Head to the Like Button area (click here).

Step Two: When asked for the URL to Like enter <?php the_permalink() ?>

Put simply, all this does is tells Facebook to like whatever wordpress post, page or website the user is currently on. This will save you generating a new like button for each post you make!

Step Three: Take the code Facebook generates for you and implement it as you would normally into your website. A great place to start is to replace your old ‘Share’ code with the new like code.

I hope this helps. It’s actually quite simple!

  • http://thewellrunsite.com Mike Johnston

    I have done something like this for the Thesis theme. Instructions can be found here:

    http://thewellrunsite.com/2010/04/22/adding-a-facebook-like-button-thesis/

    • http://www.twitter.com/alexblom AlexBlom

      Thanks Mike. I’m sure many will find that useful :)

      I didn’t go into how to add it into themes. There are so many out there I’d be writing all day!!

  • http://thewellrunsite.com Mike Johnston

    I have done something like this for the Thesis theme. Instructions can be found here:

    http://thewellrunsite.com/2010/04/22/adding-a-f…

  • http://www.twitter.com/alexblom AlexBlom

    Thanks Mike. I'm sure many will find that useful :)

    I didn't go into how to add it into themes. There are so many out there I'd be writing all day!!

  • http://blog.bottomlessinc.com PlF

    Here’s the WordPress plugin:
    http://wordpress.org/extend/plugins/like
    No coding necessary, you can customize the look and placement of the button in the settings interface

  • http://blog.bottomlessinc.com PlF

    Here's the WordPress plugin:
    http://wordpress.org/extend/plugins/like
    No coding necessary, you can customize the look and placement of the button in the settings interface

  • http://www.socialmarketingtoolkit.com JerryHilburn

    I have tried this approach in the same Thesis template your using and found that the Light Box widget that I installed interferes with the Like button iframe code.

    I am going to try that plugin suggested by P1F and see if I get the same result.

  • http://www.socialmarketingtoolkit.com JerryHilburn

    I have tried this approach in the same Thesis template your using and found that the Light Box widget that I installed interferes with the Like button iframe code.

    I am going to try that plugin suggested by P1F and see if I get the same result.

  • http://www.twitter.com/alexblom AlexBlom

    Best of luck! Let me know if I can be of any help!

  • http://www.mydietarytown.info/ Wanda Amers

    This is the only article I found that makes this easy to do and follow. Thanks a lot for sharing.

  • http://brand-new-mobile-money-machines.weebly.com/ Dan Poter

    great..i use facebook everyday ..thanks for sharing

  • Pingback: \Prednisone\\

  • Pingback: alkaline water health benefits

  • Pingback: videos porno

  • Pingback: pénisznagyobbítás

  • Pingback: เกม ผสมเหล้า

  • Pingback: que es el amor

  • Pingback: Vicodin side effects

  • Pingback: frases de amor

  • Pingback: Brock Hamilton

  • Pingback: download angry birds

  • Pingback: สมัครเกมออนไลน์

  • Pingback: how to grow taller with ease

  • Pingback: pogo games

  • Pingback: before and after

  • Pingback: Aleesha Schwab Bio

  • http://www.twitter.com/alexblom AlexBlom

    Best of luck! Let me know if I can be of any help!

  • http://www.twitter.com/alexblom AlexBlom

    Best of luck! Let me know if I can be of any help!