Twitter become more popular, now every people and website have twitter account. Using twitter there are unlimited abilites, we can share our favorite post, Retweets others tweets and many more. Today WordPress tutorial will share how to Display Total Retweets in Text without any plugin.
All need to do, just re write this code on your single.php or whatever files you’ll put this code. This code pure PHP Script. Please notes, you’ll need to join Backtype to use get an API key, after successfully join , put it in next to $key.
Display Total Retweets in Text without Plugin, Let’s go
<?php $link = get_permalink($post->ID); $key = 'Backtype Key'; $url = "http://api.backtype.com/tweetcount.xml?q=$link&amp;key=$key"; $request = new WP_Http; $result = $request->request( $url ); echo "<span class="result">".$result['body']."</span> tweets"; ?>
And done, now you have Total Retweets in Text without Plugin on WordPress easily




Pingback: Tweets that mention How To Display Total Retweets in Text without Plugin # WordPress Tricks & Tips -- Topsy.com