Add A Facebook Like Button To Your WordPress Theme In 5 Minutes
Blog visitors don’t always want to leave comments- which explains why the Facebook “Like” button has become so popular. Who needs to type? By simply clicking a little thumbs-up button, you not only announce to the world that you appreciate something, you get to track it on your Facebook account and share it with all your friends.
For WordPress users, adding a Like button to your existing blog is as simple as installing and activating one of the available plug-ins. For WordPress theme authors, here’s how to integrate Like buttons into your theme:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&layout=standard&show_faces=true&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:530px; height:60px"></iframe>
Add this to the bottom of your theme’s single.php template- and wherever else you want it to show up- and you’re good to go.
Here’s a quick explanation of what’s going on here:
Yes, you’re embedding an iframe (remember frames?) in your page.
http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?> :
Here, you’re calling up the Facebook like plug-in, and referencing the permalink of the current page or post you’re on.
These are styles, which you can make changes to if you wish.
Do you use the Facebook Like button?