Adding facebook like buttons are tricky things. It used to be I’d need to install a new plugin to have these facebook like buttons. For instance I use to use DiggDigg, which is a pretty good plugin for wordpress. However, for the initiated a code version that I could stick anywhere in my post seemed a lot more flexible to me.
So how does it work. Simple.
Just cut and copy over the code below into your single.php page and you’re good to go:
<code><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></code>
It’s that simple. For more info, head on over to the post I copied this info from. It’s from a great website called WPBeginner that will actually setup your blog for free (some fine print though).
So now you’ve got your facebook like button, and it can be either at the top of your post, the bottom of the post, at the middle, or even in the archives.
I noticed a lot of people like to have the scrolling like buttons at the side of the post, I think these things just complicate the website design, but that’s just me. Seeing something scrolling while I’m reading a post is just irratating to me.
For the even more initiated, you can read more about the facebook like button here at the Facebook Developers page.
After a couple rounds of informal testing, I’ve discovered that this post is incomplete. Due to the fact that the thumbnail image on the post would always be messed up. In order to fix a wrong image being displayed in your facebook like, your best bet is to install the facebook-like-thumbnail plugin (do they have plugins for everything on WordPress??)