Add Facebook “Like” Button in WordPress?

How to add a Facebook “Like” button to WordPress

  • Open the required PHP file for example single.php or index.php
    Single.php and/or Index.php
  • Copy the following code into single.php (note: this will work in index.php as well) after
    <?php the_title(); ?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px"></iframe>

 




For more WordPress tutorials

Follow us on Twitter
Subscribe to our Feeds
Become a Fan on Facebook
Added Sunday, March 27th, 2011. Category WordPress Keywords

One Response

Cher 03.27.2011

I’ve been looking for a tutorial on this one. I’m not really savvy when it comes to html so this is really a big help. Thanks!


Add your comment




New Tutorials in your inbox!






Most Popular Category Today

Think Tutorial is a database of simple, easy to follow tutorials covering all aspects of popular computing. Technology is fantastic, but it can be difficult to keep up with at times. Think Tutorial's strength and success resides in its very intuitive approach and design that keeps everything simple and organized.

Statistics

TUTORIALS PUBLISHED
1,442

EQUATES TO
+3700 minutes
or
+62 hours of continuous education.

USERS ONLINE
349

AWESOME FACEBOOK FANS
5446

Why Free?

Free, easy, useful and straight-to-the-point stuff? That's what people want!

Follow Us

RSS Subscribe to Feeds
facebook Be a fan on Facebook
twitter Follow us on Twitter


© 2010-2012 Prestance, Inc. All right reserved.

All Trademarks and Brands displayed on ThinkTutorial are the sole property of their respective owners/creators and All third party trademarks are the exclusive property of the respective companies and their use does not indicate endorsement.