
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.

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="http://www.facebook.com/sharer.php?u=<?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
)
7 Responses
Wondering if you knew how to get the Like on FB (or “Share This Blog”) when one doesn’t have a custom blog theme? I don’t have a place to put plug-in info (I’m at wordpress).
Thanks!
when i add the code to single.php it only shows the like button on the new posts and not the old ones. can i add it to the old ones too?
dont forgot the head application in your theme folder
could you share the the code for placing it in the functions.php file to prevent future upgrade overwrites? Thanks!!
Minor amend to this would be to make the link contain & not & to help with HTML validation
It would be nice to know where single.php is. I’ve looked through all the directories and can’t find it.
Donald, to find single.php go to “yourblog”/wp-content/themes/”anyThemeThatYouChoose
Trackbacks: