Facebook “Like” Button for WordPress

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Some very easy copy-and-paste code here to add to the template for blog posts to allow for Facebook “liking” of the article. Probably best in the single.php template underneath where it outputs the content of the post.

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(get_permalink()); ?>&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" id="facebook-like"></iframe>