Wednesday, August 18, 2010

TutZone- Tutorials, Design news and Inspiration

TutZone- Tutorials, Design news and Inspiration

Link to TutZone

How To Add Facebook “Like” Buttons to Your WordPress Blog

Posted: 18 Aug 2010 11:29 AM PDT


Facebook being 2 top most visited site after Google has so much potential in regards of traffic that every blogger/website owner should use it. Facebook launched their Like button some time back and it spread like fire after being launched. Nearly all blogs use it now a days. Here is a simple tutorial if you want to integrate like button in your WordPress blog.

facebook like

One Step Tutorial:

Place below code where you want to display your Official Facebook Like Button:

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



Note: You can modify this code further.

- You can modify the width of iFrame as you want by changing height and width accordingly.

- If you want to change the text from Like to Recommend or anything else, then change:
action=like
to
action=recommend or anything that you like.

- If you want to show avatars of your friends who liked the article, you can simply change:
show_face=false
to
show_face=true

- If you want to display the simple button with only the count and nothing else, then add this to your code:
layout=button_count

- If your blog is using light background theme, then you can use dark button by adding this to your code:
colorscheme=dark

That’s it.

No comments:

Post a Comment