Adding Facebook Like to WordPress Page / Post

Above is the example
To Add this like button u can simply add this line

[php]
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo get_permalink(); ?>" show_faces="true" width="450"></fb:like>
[/php]

or this line

[php]
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like></fb:like>
[/php]

to your single post options in wordpress themes editor.
here is the step by step :

1. Open Appereance – Editor
2. Open Single.php
3. Paste the line after or before

[php]<?php the_content(); ?>[/php]

4. Save, and Try your first post with facebook like

Leave a Reply

Your email address will not be published. Required fields are marked *