I have started adding the new Facebook Like button around the blog, experimenting about where best to put it. I have inserted a Like button into the wordpress post loop, so you can see it in every individual post. However this only displays it in the post if you click to view the whole post, it isnt displayed on the main page.
So I’ll add one here, for the craic:
There are a couple of options to play around with too. Well 4 to be honest, and I haven’t gotten to grips with them fully yet. One of them shows the faces of people who have “liked” the post/page/link etc already and here are those parameters:
- layout=standard
- show_faces=false
- action=like
- colorscheme=light
The layout option above is set to standard. I will have to RTFM to find out what non-standard options exist and what they do. show_faces is either True or False. IF its set to True, the faces of people who have liked it will be displayed, if its not then just a line of text is displayed. Again for the action parameter I will have to RTFM. I doubt there is a dislike option. I mean who would put that option on their site, its askin’ for trouble. Finally colorscheme (note the American spelling for colour) is either light or dark. I think. Maybe another blast of RTFM for this too.
Finally, here is the code to add to display the Facebook Like button:
<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>