How to share each posts facebook and twitter in wordpress

Hi friends,

This post explains how to share each posts to social sharing sites like twitter and facebook , with a simple scripts.

To share post with facebook :

<a name=”fb_share” type=”button_count” href=”http://www.facebook.com/sharer.php”>Share</a>
<script src=”http://static.ak.fbcdn.net/connect.php/js/FB.Share” type=”text/javascript”>
</script>

Share with Twitter:

<b>
<a href=”http://twitter.com/home?status=<?php the_title(); echo “:”; the_permalink(); ?>” title=”Click to send this page to Twitter!” target=”_blank”>Share on Twitter</a>
</b>

Write above scripts at single.php ,  This is at

/public_html/wp-content/themes/<your theme folder>

Now we can share it, and increase your traffic …

With more than 9 years experience in PHP and Founder of Anil Labs, a blog for PHP and related posts. contributed posts regarding CodeIgniter, CakePHP and Learn PHP online ... Contact : php.anil@gmail.com

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>