Add share on Twitter button on blog

| January 15, 2009 | 12 Comments
email

twitter-blogger-wordpress.png

Twitter is growing day by day at faster since Internet crowd is diverting towards microblogging services or you can say twittering. Very common thing that can be found on Twitter are the links to interesting articles that were published and those who want to share it. Just as there are buttons to share your entries in various social sites, you can add a button to share from Twitter. I don’t know of any services or WP-Plugin which has “Share on twitter Button” so, do it yourself by following simple steps.

WordPress

First of all find some cool Twitter icon to be used as button (instead you can use text too) You can get free collection here. Upload it your server or anywhere else and note its URL.

Go to Single.php of your current WP theme and insert following code

For Text : <a href="http://twitter.com/home?status=Leyendo <?php the_permalink(); ?> en <?php bloginfo('name'); ?>" title="Add to Twitter" class="wptwitter"> Twitter </a>
For Image : <a href="http://twitter.com/home?status=Leyendo <?php the_permalink(); ?> en <?php bloginfo('name'); ?>" title="Add to Twitter" class="wptwitter"> <img src="YOUR IMAGE URL" alt="Twitter icon"/> </a>

For Blogger

Find Twitter icon to be used as button.

Go to Edit HTML under Design layout and find the code :

<p class='post-footer-line post-footer-line-3'>

Now paste the following code after it :

For Text link : <a expr:href='"http://twitter.com/home?status=Leyendo " + data:post.url + " en " + data:blog.title' class="btwitter" title="Add to Twitter"> Twitter </a>
For Image Button : <a expr:href='"http://twitter.com/home?status=Leyendo " + data:post.url + " en " + data:blog.title' class="btwitter" title="Add to Twitter"> <img src="YOUR IMAGE URL" alt="Twitter icon"/> </a>

Note for Image buttons : Insert Image URL wherever I have written YOUR IMAGE URL to display the button.


About the Author ()

Rohit Langde is editor-in-chief and owner of Blogsolute. He is Born-Geek and Technology Enthusiast. Being a blogger, he is also Mechanical Engineer who believes in simple Living. You can

Comments (12)

Trackback URL | Comments RSS Feed

Sites That Link to this Post

  1. Share on Orkut Promote button for Blogger and Wordpress blogs | December 17, 2009
  1. pinay says:

    thanks for the post, i can now try adding twitter button on my blog..as well as other reliable buttons!

  2. Webetrix says:

    Your post really helped me to add twitter after post on my blog http://indianattire.blogspot.com. Thanks for you informative post! keep it up!

  3. If you have twitter account and would like to add more followers, you should embed the follow me button to your blog.

  4. kalyan says:

    Have been looking for this For rt as a Text link all over the place,finally found it here ,thanks a lot and I liked your blog very much so just started to follow it ..

  5. Faizal says:

    how to do it at the side bar section instead? thanks!

  6. shilpa2 says:

    Thanks for all your interesting inputs.i can now try adding twitter button on my blog..as well as other reliable buttons

  7. good… please see my blog

  8. thank you , nice information , how to add in smf forum

  9. I don’t know of any services or WP-Plugin which has “Share on twitter Button” so, do it yourself by following simple steps.

  10. Paris says:

    Hi, I found this site, have some fun buttons,

    http://twitteronbuttons.com/

    Have a nice day :)
    Ciaooooo

  11. wqs says:

    very helping tutorial…thanks

Leave a Reply