How to add FB Like to every post
It’s quite simple actually, I’ll guide you through the whole process after the jump…
Getting Started adding a FB Like button to all posts in your theme:
Open one of the template files for your theme where you would like the button to be. Let’s say we want a button after the title in every post, so we would need to edit single.php
Where ever you want the code to appear, just drop in the following line of code: (Remove all the line breaks, this is a one liner.)
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&layout=standard&show_faces=false&width=300& action=like&font=segoe+ui&colorscheme=evil" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:300px; height:30px">
Valid options for show_faces is true or false. True Shows faces and False doesn’t. Pretty simple.
Colorscheme is light, dark or evil. I choose evil, but I’m not sure what’s evil about it. Looks just the same as light does to me.
Obviously the width and height need to be adjusted to your theme and the placement in your theme to suit it best.
*In the code above, anything marked in this color is what you can change to customize it, or use the customization wizard located at: http://developers.facebook.com/docs/reference/plugins/like If you make your own using the wizard, don’t forget for the to add the Pink code after you generate your button, for the URL just put in blank.com and customize like you want. Then replace blank.com with<?php the_permalink() ?> for using in your wordpress theme.