How to: Add a “Share on facebook” link to your WordPress blog

March 16, 2009 at 10:34 am

As you know it, facebook is a very popular website, which allow you to share webpages you like with your friends. In order to promote your blog and gain some more traffic, you should definitely add a “Share on Facebook” link to your blog.

Simply paste the following code on your single.php file, within the loop:

<a href="<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank">Share on Facebook</a>

That’s all. Your readers are now able to send your blog post on Facebook and share it with their friends!
(PS: I’m not on facebook, so don’t ask 😉 )