Wanted to test placing facebook like button on my blog, just breaking down the steps how i added it to my posts.
How to Put Facebook Like Button On WordPress Blog posts
- Open the single.php from wp-content/themes
- Then find the lines where the post loop is running, it differs from theme to theme.
- I found the <div> containing the post loop for my twentyten theme
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
</div><!– #post-## –> - so i put this code right before the <div> ended containing the post loop.
<iframe src=”http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:450px; height:60px;”></iframe>
- Added the code wherever I wanted the button to appear.
- Adjusted the parameters like show_face=true/false and colorscheme=dark/light depending on preferences.
- Saved the template.
Here it was, the Facebook Like Button at the bottom of each posts. Done.

