Add a Facebook “Like” button to WordPress Easily

Your friends spend most of their time on Facebook, so why not take advantage of that on your WordPress site?  Adding a Facebook “Like” button to your WordPress theme is very easy to do.  In this example, we will show you how to add a “Like” button to your posts by editing one file:

Open your theme’s single.php file and add the following code where you would like it to be displayed:

<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:25px"></iframe>

http://developers.facebook.com/docs/reference/plugins/like/#

Note: This one is my own creation.

About Joe D

I have always had a passion for everything computing. In early 2000, I decided to take my passion to the web. Thus, C.O.D. was born. Through the years we have made many great friends at C.O.D. and hope to continue our journey for years to come.

Check Also

Manage Multiple WordPress Sites with InfiniteWP

Running your website, or websites, on WordPress is an easy choice as the flexibility the …

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.