How to add facebook ‘like’ button to your wordpress blog?

Technical 5 Comments »

Facebook has added the ‘Like’ functionality for the web that we all like so much (no pun intended!). And guess what, it’s dead simple to make each post on your blog likable.

Now, assuming you want to create this for each post on your blog (it makes little sense to like a category or tag or the blog itself, although it can be done! ), you just need to add this button on each post that you create. For that, all you need is the php file which is included only on single blog posts, and its permalink. For wordpress, the file is called ‘single.php’ and is included within your theme. So browse to your wp-content directory, then your plugin’s name, and then edit the ‘single.php’ in it.

The code that you will need on single.php can be generated here. Facebook presents to you a widget, through which you can create your custom ‘like’ button. In the ‘URL to like’, include <?php the_permalink() ?>, it’s the wordpress php code for generating URL for each post. Go ahead and change any other values you would like to tinker with.

Finally click on ‘Get Code’, and include this code in the ‘single.php’ of your blog. You’re done!
Creating Facebook - like button for your blog

It’s too simple to be missed even by the people who don’t know abc about php or wordpress, and the kind of virality this feature has is immense. Gone are the days when you used to customize your blog for keywords and optimize each post for search engines just to be seen and get more traffic. Facebook provides us with social sharing outside of facebook, even easier than tweeting, IMHO.

Facebook screws up sometimes too

1000 things that grind my gears, Website reviews No Comments »

If you think that orkut is the only social networking platform that cannot count, think again!

We’ve all had problems with orkut’s calculations gone wrong with number of friends, scraps, posts in communities. It’s a common error you get when you see when you check a community thread with number of posts, say ’14′, but when you click through, you get only 11.

But facebook has gone a step ahead and has started messing up with dates. You can actually write a wall post in future as well :)

facebook-sucks

I went to a person’s profile to wish him ‘happy budday’, but guess what… people had already wished him ‘tomorrow’ and he had replied to them as well. I thought it would be some kind of problem due to time-zone difference, but he’s from India as well, so my theory had to just bite dust then and there.

p.s.: Yes, the birthday dude’s nickname is ‘mausi’.

And yes, wishing people ‘tomorrow’ for their birthday is another thing that really grinds my gears.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Design by Anuj Rathi.
Entries RSS Comments RSS Log in