Home » Internet » Social Media » How to put the FaceBook Like button on your WordPress blog

How to put the FaceBook Like button on your WordPress blog

The FaceBook Like button lets your WordPress blog visitors promote your links from within your link, without you having to first post the link on FaceBook. According to the recent figures available on various blogs and websites more than 5,00,000 websites and blogs so far have put various FaceBook buttons on their websites.

A FaceBook like button appears like this:
FaceBook Like button appearing on your WordPress blog

A great thing about using a WordPress blog is that it’s very easy to change the source files. Although you can use plugins to activate the Like button but when you can alter the source code you can be more flexible about exactly where the button appears on your web page or blog post.

For this particular section, go to the folder of your current blog theme. The path should be


You’ll need to edit your single.php because this is the file that handles individual blog post publishing. Normally, social media buttons appear at the end of the post content. You can insert the FaceBook Like code after this line:

<?php the_content(); ?>

And this is the code that you insert:

<iframe src=”http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&layout=standard&show_faces=true&width=450&action=like&colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:450px; height:60px”></iframe>

You can read more about the Like button on this FaceBook link.