Sign Up For Web Hosting Now!

How to Add a Facebook Like Button to Your Posts

Now, it is easier than ever to add the Facebook famous "Like"/"Recommend" to your posts and increase their popularity.

First, you need to login as administrator to the WordPress admin panel. Then go to Appearance -> Editor. Then place the following code wherever you want the like button to appear:

<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=350&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:350px; height:25px"></iframe>

The final result should look like this:

FaceBook Like Button

Previous Next
(c) Copyright 2004-2012 SiteGround. All rights reserved
WordPress is a trademark of Free Software Foundation, Inc. SiteGround is not affiliated with or endorsed by the WordPress Project or its trademark owners.