Adding “Share on Facebook” button to your posts

Here is line of code that if added to your wordpress blog theme will create a link “Share on Facebook”. This will make it easier for your readers to share your posts on Facebook.

No plugin needed. Just add this code where you want the link to appear, but make sure it’s in the loop… somewhere between title of the post and comments codes:

<a href=”http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>” target=”blank”>Share on Facebook</a>

You can replace the “Share on Facebook” text with facebook button.



16 Comments on "Adding “Share on Facebook” button to your posts"

  1. That is super-helpful and a great idea.

    Thank-you!

  2. Thanks for the code. The fact that you can just paste the code in your blog is very helpful.

  3. Ah Hong says:

    I didn’t place any social bookmarking button plugin in my blog just to reduce load :)

  4. Can I use it to my blogspot?
    Thanks for sharing with us brother.

  5. buat web says:

    Thanks the code, i will use it at my blog.

    David

  6. mp3 tunes says:

    Thanks for the info, I was always interested in how other people are doing such a reference on Facebook …

  7. Adding this button to your posts makes it so much easier for people to post stuff they like to their Facebook profiles, for all their friends to see and enjoy. The easier you make it for your readers, the more reward you’ll receive. We all know that one of the basics of human relations is that everybody is inherently lazy, and the easier you make it for people, the more likely you are to get buy-in from your targeted audience.

  8. This is great. It’s so simple. Thank you!

  9. abrablog says:

    thanks. I think its good to try it sometimes.

  10. Easier to just use a plugin though surely?

  11. i have also got a very decent search engine ranking to my post about share on facebook link to blogger..
    http://about-new-blogger.blogspot.com/2009/06/add-share-on-facebook-link.html

  12. Cigars says:

    simple and easy! Thanks!

  13. It’s really easy to add facebook button on post and no plugin needed for it. Thanks.

  14. This is a great simple way to get a Facebook share button on your blog specifically word press, but what I find to be more simpler and efficient is to search up in Plug ins “Share Button” and install the highest rating Button. It would have Facebook, Digg, Twitter and many others than just Facebook.

  15. This is a great simple way to get a facebook share button on a word press blog but what I find to be more simpler and less complex is to search in Plugins “Share Button” and install the highest rated Share This Button. It would have Facebook, Twitter, Digg and many other social networking sites.

Trackbacks for this post

  1. Blogging – Posts about Blogging as of July 28, 2009 | MelaniedeJonge.com

Got something to say? Go for it!