Advertise Here

Followers

Powered by Blogger.

Simple way to add twitter and facebook share button to your wordpress blog

If you are a blogger, it is almost likely you want traffic to your post and most people use Facebook and Twitter for that. In this tutorial, I am going to show you how you can automatically add twitter and facebook button on your post. Follow the instructions


Why should you use social media buttons? Because it helps to give your blog post traffic through inbound or backlins.

Others can also retweet your post and that gives it more traffic. Also, search engines like it for ranking and feeds too.

Copy the code below and log into your wordpress dashboard, locate your funtion.php file, paste the code in there and save. You are there.

------------------
networking sites especially twitter and facebook to
function share_this($content){
    if(!is_feed() && !is_home()) {
        $content .= '<div>
                    <a href="http://twitter.com/share"
class="twitter-share-button"
data-count="horizontal">Tweet</a>
                    <script type="text/javascript"
src="http://platform.twitter.com/widgets.js"></script>
                    <div>
                        <iframe
src="http://www.facebook.com/plugins/like.php?href='.
urlencode(get_permalink($post->ID))
.'&amp;layout=button_count&amp;show_faces=false&amp;width=200&amp;action=like&amp;colorscheme=light&amp;height=21"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:200px; height:21px;"
allowTransparency="true"></iframe>
                    </div>
                </div>';
    }
    return $content;
}
add_action('the_content', 'share_this');

Related Posts :



0 comments:

Discounted Hosting: Use Coupon Code: hostd25dis or rushhot2011

About Me

Phillips Tent
This site was created by an Adsense Guru. I have been making money from adsense monthly since 2007 and I am passing my experience as a blogger to newbies and those who want to learn more about adsense here
View my complete profile

Become a Guest Blogger

CB

Fan Page

Don't Miss Post: Subscribe

Most of Our Readers Get Updated Post From Every Post to their Email. Subscribe here to get posts.Enter your email address:

Delivered by FeedBurner

Get this widget

Share Our Post