How To Display Twitter counter in Text


Sponsored Links






Update: Better Code Display Twitter Counter Text using WordPress Api

Display Twitter Counter in Text is easily in WordPress with PHP code, all need to do just write down some PHP Script in our wordpress theme, we can write it on sidebar.php, footer.php, header.php or whatever we want to put on.

This code is similar with our previous tutorial about display FeedBurner counter in text, but we need to change some code, because the source is different, we still use file_get_contents() functions, this functions is the some function that we use to modified TimThumb Script to make it work on some server problem. So, let’s get started

Write down Display Twitter Counter in Text code below

<?php
$twit = file_get_contents('http://twitter.com/users/show/USERNAME.xml');
$begin = '<followers_count>'; $end = '</followers_count>';
$page = $twit;
$parts = explode($begin,$page);
$page = $parts[1];
$parts = explode($end,$page);
$tcount = $parts[0];
if($tcount == '') { $tcount = '0'; }
echo '<div class="twitter-badge"><strong>'.$tcount.' </strong> Followers</div>';

?>

Replace USERNAME with your own USERNAME, example our Twitter username is @WPTricksNet (you can follow it if you want ;)

That’s all, save your code and test it… I hope tutorial display Twitter Counter in Text work like charms just like our FeedBurner Counter in Text tricks too. Thanks for Webm.ag for share, via ThemeGamag Don’t forget to subscribe our RSS

Update: Better Code Display Twitter Counter Text using WordPress Api

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

How To Display Total FeedBurner Reader in Text

FeedBurner is easy method to display our total reader. And using a little PHP code we can display our total FeedBurner Reader in Text in WordPress is easily. To implemented this code is easy, all need to do write down … Read More

Tricks: Display Total Twitter Followers as Text on WordPress

Everybody blogging everybody using Twitter for Microbloging tools. On this tips, I will show you how to display your total twitter followers on your sidebar or whatever and displaying as text. All need to do is add little bit code … Read More

The Better Way Display Twitter Followers in Text

There are so many ways to Display Twitter Followers in Text, the popular way is we can use CURL method, we have writen the tutorial display twitter followers in text using CURL. But this method for some WordPress Developers said … Read More

How To Autolink on Twitter Username

Now, everything have twitter account, Website, Actor, Singer, Politican, Webstore, Website, Google, Yahoo and everything on Twitter. We Have too, so follow our Twitter @WPTricksNet For us, Twitter and WordPress is the right couples. So, I will

How To Display Total Retweets in Text without Plugin

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

Display Twitter-like “time ago” on your WordPress

There are some ways to display twitter-like "time ago" date format in our WordPress. We can use plugin (we recommended this plugin) or we can create and write little functions to handle this. On this tricks I will show you … Read More

How To Display Twitter counter in Text / WordPress Tricks & Tips

Update: Better Code Display Twitter Counter Text using WordPress Api. Display Twitter Counter in Text is easily in WordPress with PHP code, all need to do just write read more

Source: http://wptricks.net/how-to-display-twitter-counter-in-text/

How To Display RSS and Twitter Count in Plain Text

So, wouldn’t a neat trick be to display these counter on your own is the count for both RSS and the Blogussion Twitter followers. I like to have them display as text read more

Source: http://www.blogussion.com/favorites/display-twitter-rss-count/

Twitter Buttons - Twitter Counter

Copy/paste the following code to your blog to display the Twitter button: Start of Twitter Counter Code --> read more

Source: http://twittercounter.com/pages/buttons

WordPress › TwitterCounter « WordPress Plugins

Display Twitter Widget; Choose custom colors for background and text ; Sidebar widgets included for ease of use Tags: badge, counter, followers, twitter, twitter widget read more

Source: http://wordpress.org/extend/plugins/twittercounter/

Most Wanted Twitter Hacks and Plugins for WordPress

Do you want to display your twitter count as text, so it blends in to your you can use a plugin called “Subscribers Text Counter“. This plugin will let you display read more

Source: http://www.wpbeginner.com/wp-tutorials/most-wanted-twitter-hacks-and-plugins-for-wordpress/


26 Responses to How To Display Twitter counter in Text

  1. Pingback: Mostrar el Numero de seguidores de Twitter en Wordpress | Recursos para Diseñadores Gráficos y Web | Creativos Online

  2. Tech Tricks says:

    I was searching google and other search engine and I found this solutions on this site… this is super tutorial..

    thanks for share

  3. Wonderful Twitter Tricks, I was try to find out this code for a while.. and we got it here

  4. Freelancer Witrer says:

    When will google buzz overtake twitter?

    • WP Tricks says:

      I think it’s will never happen.. Google Buzz it’s look like similar with Twitter… but it’s different…. Buzz is more thatn 140 Character… it’s Feed syndication from many many services included Twitter… ;)

  5. Pingback: The Ultimate Guide To Wordpress Hacks And Customizations | pro2go Designs Blog

  6. Pingback: Wordpress Hacks e Customizations! | sinergie.::.websolution | il blog

  7. TechGyo says:

    Great tip. Thanks for sharing

  8. Pingback: sinergie.::.websolution » Blog Archive » Wordpress Hacks e Customizations!

  9. Space Game says:

    Why not create a plugin for that? A lot of people are not familiar with php coding and how to run that code.

  10. Really nice tips.thanks for your help, man!
    Go on with it!

  11. Katie says:

    Thanks, this is the only twitter code I’ve gotten to work. :)

  12. poker says:

    Hey guys, there is a simpler option that prints out the Twitter follower counter as plain text for WordPress blogs.

    I’ve developed a plugin that does that with an extra: you know how if Twitter is offline (fail whale) or it is slow, and how it impacts on your site, making it slow too?
    I’ve figured out a way to solve that by simply creating a cache. If Twitter is down, you still get your followers shown as it grabs the last known number of followers.
    Pretty neat, huh? Just check out the WordPress Plugin Directory for “Twitter Counter Cache-rizer”. Easy to install and works just fine!
    Here’s the link if you’re interrested:
    http://wordpress.org/extend/plugins/twitter-counter-cache-rizer/

    Hope it helps someone out!

    By the way, awesome blog design! I loved this wooden theme!

  13. Pingback: Mostrar el numero de tus seguidores en Twitter | Blog de Miguel Chang

  14. Pingback: wp-popular.com » Blog Archive » How To Display Twitter counter in Text # WordPress Tricks & Tips

  15. Thank you this twitter counter works great on my site. I will recommend it to my blog partners..

    • vanessa says:

      hi, thank you for the code, really very helpful.

      anyway, how do we display the number of friends or twitter accounts followed on my site/blog?

      thank you, i truly appreciate it. ;)

  16. Cool tutorial. Will be cool to get a twitter counter on my blog.

  17. UIAvenue says:

    Really cool tutorial. I was searching for it. I am searching for a plugin to display both twitter counter and rss feed reader counter, though.

  18. Jefferson says:

    Great tip, it’ll help me. :)

  19. Pingback: The Better Way Display Twitter Followers in Text # WordPress Tricks & Tips

  20. Pingback: How To Autolink on Twitter Username | WordPress News Wire

  21. Pingback: Welcome to WPTricks.net | WordPress News Wire

  22. Pingback: How to Display Twitter Counter in Text | Fazreen

  23. Kpop Flash says:

    another great related post plugin is nRelate. I’m sure it will be great! thanks for the tutorial :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>