WordPress: The Best Tweet This Link Ever
Reading time: About 0 minutes
With the right people sharing your blog entries on Twitter, you’ll receive a good amount of quality referrals. One way this occurs is a retweet from frequently retweeted people as seen here.
The other way is to make it super simple for readers to tweet your blog entry. That’s where this post helps. If you have a self-hosted WordPress blog, add this code to your /wp-content/themes/[current theme]/single.php file where you want your own “Tweet This” link. [TinyURL shortening code originally from here]
1 2 3 4 5 <?php $shortenedurl = file_get_contents('http://tinyurl.com/api-create.php?url=' . urlencode(get_permalink())); ?> <a href="http://www.twitter.com/home?status=<?php echo str_replace(' ', '+', the_title_attribute('echo=0')); echo '+' . $shortenedurl; ?>" title="Share <?php the_title_attribute(); ?> on Twitter">Tweet This</a>
274
8 comments skip to comment form
Drew Douglass said— 6 minutes later
Robert Banh said— 17 minutes later
metroscapeGuy said— 3 hours later
Mimojito (aka Efren) said— 1 week later
Nixy Valentine said— 2 weeks later
Lewis said— 2 weeks later
Lewis said— 2 weeks later
Brian Cray said— 2 weeks later
Respond to this post—