New Facebook Like Button For WordPress


August 18, 2010Wordpress1 Comment

Facebook has rolled out an improved version of its like Button. The new Facebook like button looks like the compact Official Tweet Button. The Facebook Like button will show the no of likes your post received.The like button has some changes from the older version in the way the user is allowed to like and unlike(It now a little difficult than before to unlike :P )

Edit your WordPress theme and insert the following code into your WordPress Post Loop(If you want it to appear on Post pages only, then edit single.php.Otherwise you will have to edit multiple theme files)

<iframe src="<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=arial" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:40px;"></iframe>

Parameters of the Like Button
1.layout=button_count will provide you with the new like button.If you change it to layout=standard , then you will get the older version of the like button
2. show_faces=false If you set this parameter to true(show_faces=true), then it will show faces of those who like your post
3.There are three different color schemes available . The code has the light color scheme. To use the other two color schemes change colorscheme=light to colorscheme=dark or colorscheme=evil can also change the font used by changing the font parameter
You can change font=arial to any of

1. font=lucida+grande
2. font=segoe+ui
3. font=tahoma
4. font=trebuchet+ms
5. font=verdana

5.To change the text that appears on the button, you can change action=like to action=recommend

New Facebook Like Button for Blogger

One Response to “New Facebook Like Button For WordPress”
  1. rob says:

    I think I just identified a pretty major bug in Facebook’s ‘Like’ button, which allows webmasters to write data on FB’s social graph, which cannot be ‘deleted’ *if* they should they make a mistake when they initially implement the code into their website.

    And due to the way FB presents the tool and the code generator to the public, many webmasters do not read the docs (and just add the cut and paste code) and fail to add the meta tags required to admin the tool… which causes permanent problems later, if they ever want to admin the tool. In fact, most webmasters with this issue don’t even know there an admin panel should have been dynamically generated for them when they first added the code, which they forever locked themselves out of.

    They post will probably be deleted soon… because ‘stickied’ threads in the developers’ forums tend to do that… but here is the most current status of the issue:

    …this is a pretty major bug, imo. They need to stop the bleeding by getting a note on that ‘Like’ Button Code Generator asap, then trying to figure out a way they can remap the admins to the domains.

    But now they have an issue with authenticating the admin really has the website’s permission to admin their tool… and that’s a little sticky. I suggested they email the ‘tech contact’ listed in the whois of the domain in question. Otherwise you have a hijacking risk.

    Another issue is simply that the easiest solution may involve deleting the data associated with the fan’s actions, which means people waiting for the solution will eventually have their count go back to zero. And webmasters don’t get enough loves as is so I doubt they will take losing all their hard won contacts without a bit of a backlash. Especially when many are bloggers. I guess we’ll see what they say Monday.

    Anyway, thought you might be interested in following this.

    Take care,

Leave a Reply