New Facebook Like Button For WordPress

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 August 30, 2010

Leave a Reply

Your email address will not be published. Required fields are marked *