Tweet This Text Link For WordPress

By

August 15, 2010Wordpress2 Comments

Are you trying to add a Tweet This Text link to your WordPress blog? Then you have come to the right place. Some of you might feel that the Official Tweet Button is not fully Customizable and slows down your site by using JavaScript.

To add the tweet link to your wordpress blog, Edit your Template’s single.php file and add the following code

<a href="http://twitter.com/share?text=<?php echo urlencode(the_title()); ?>&amp;url=<?php echo urlencode(the_permalink()); ?>&amp;via=twitter&amp;related=<?php echo urlencode("coderplus:Wordpress Tips, jQuery and more"); ?>" title="Share on Twitter" rel="nofollow" target="_blank">Tweet This</a>

inside the post loop.

In the code you can edit via=twitter with your  twitter handle.Ex.If your twitter username is martin then you can change it to via=martin you can also edit the related account by editing related=coderplus: WordPress Tips, jQuery and more

If you have any queries, leave a comment and i will help you out :)

2 Responses to “Tweet This Text Link For WordPress”
  1. Envend says:

    “In the code you can edit via=twitter with your twitter handle.Ex.If your twitter username is martin then you can change it to via=martin you can also edit the related account by editing related=coderplus: WordPress Tips, jQuery and more”

    How can I customize it for http://twitter.com/#!/Envend

    I’m having troubles

    • Coder says:

      you can change via=twitter to via=Envend . If you would like to recommend a friend’s accound, then you can do that by changing related=coderplus: WordPress Tips, jQuery and more to related=friends_twitter_handle:some_description

Leave a Reply