Yesterday Facebook announced a new set of social plugins. Here’s the code to put the like/recommend button directly in your Wordpress posts. It’s very easy, just cut and paste this code into Single Post (single.php) in the theme editor:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink()); ?>&layout=standard&show_faces=true&width=450
&action=recommend&font=verdana&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
I would recommend to place it right after the post, just before the comments, which on my wordpress is the line just before
<?php comments_template(); ?>
You may visit facebook Like button to customize it further. Just remember to change, in the code provided there, the “URL to like” with < ?php echo urlencode(get_permalink()); ?> right after the ?href= and right before the & amp;

0 commenti ↓
Non ci sono ancora commenti a questo articolo; inizia una discussione! Inserisci un commento usando il form qui sotto.
Lascia un Commento