Add the Facebook LIKE button to WordPress blogs

Sponsors

Facebook Like button released on Apr. 21st 2010. Facebook’s social plugins were integrated into more than milions of  websites.
This number will increaze by the time.
If you want to add the facebook like button in your wordpress website, I recomend not to use any plugin because that will be very easy without adding any plugin.

Just open your theme folder and in that you will find the single.php and index.php file. Open that files and put following code in that file.

Befor following title line you can put the code. Like as follows:

<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<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:30px"></iframe>

Following are the custom setting for changing the facebook like UI. You change that as per your requirment.
if you like to show the faces of your friends, change the part “show_faces=false” to “show_faces=true”

If you like to show the label of the button as “Recommend“, change the part of the code “action=like” to “action=recommend”

I hope this will help you to implement the “Like” button on your WordPress Posts! Have fun and drop me a line at twitter or you can click on the “Like” button on the top of this post

Incoming search terms:

You may like following Articles!

This entry was posted in wordpress by Wordpress API. Bookmark the permalink.

About Wordpress API

API means Application Program interface. In Wordpress API we are giving all the information about wordpress API. We worked for many wordpress plugins and themes. We have expertise in PHP, Databases, Graphic Design, Ruby on Rails, Java, Wordpress, Drupal and many CMS. We always give you the best solutions about wordpress and other related topics in This Blog. We will give you always fresh tips and tricks and techniques about wordpress in this blog.

9 thoughts on “Add the Facebook LIKE button to WordPress blogs

  1. Pingback: Tweets that mention Add the Facebook LIKE button to WordPress blogs | Developer Code book -- Topsy.com

  2. Pingback: Adicionar o botão “Like” do Facebook | Ajuda WordPress - Plugins WordPress, Temas WordPress e Dicas

  3. Excellent and very thoughtful post! I really appreciate the time and effort you put in every single one of your posts, and finally decided to drop a comment on one of them! If you got some extra time on your hands and looking to improve your search engine rankings in the new Google Caffeine search results take a look at the Google Caffeine eBook…

    Anyways, good luck on your blog, and feel free to check out : Google Caffeine

    Thanks so much!

    All the best,
    Dino Vedo

  4. Aw, this was a really quality post. In theory I’d like to write like this also – taking time and real effort to make a good article… but what can I say… I procrastinate alot and never seem to get anything done… Regards

  5. Hey man, was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more. You, my friend, ROCK!!!

  6. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can’t wait to read lots of your posts. . . .

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>