Subscribers Text Counter – WordPress Plugin

This plugin let you create your customized twitter followers, Facebook fans and FeedBurner RSS subscribers counters. It creates widget or let you display these counters as raw text anywhere in your template or post/page content. You
get it as a text so you may customize design with your own HTML/CSS.

With this plugin you will not need any more third party buttons or scripts as it connects directly to FeedBurner, Facebook and twitter. This plugin should speed up your blog as counters are cached in your database and are refreshed no more than once per 2 hours. With third party buttons every page load gets all counter data from external websites that slow down you blog.

Quick howto:

  1. To display counters use following tags: `twitter`, `feedburner`, `facebook`, `youtube`, `wordpress`, `all`
  2. To display links use following tags: `twitterlink`, `feedburnerlink`, `feedburneremail`, `facebooklink`, `youtubelink`
  3. In widget area use it like this: %twitter%
  4. In post/page content use it like this: 565
  5. In templates use it like this: <?php echo stcounter('twitter') ?>


  1. Upload `subscribers-text-counter` folder to the `/wp-content/plugins/` directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Update your your setting with 'Settings/Subscriber Text Counter' menu in WordPress and click Refresh to load counters (to set all counters read the instructions on settings page)
  4. You may put 'Subscriber Text Counter' widget on your sidebar through 'Appearance/Widgets' menu in WordPress
  5. Display your counters as described on top of  'Settings/Subscriber Text Counter' page


Happy with "Subscribers Text Counter"?
Please show your support with a donation:


Plugin is hosted on WordPress plugins directory. You can download it from here.
Code is available on GitHub too. You are welcome to review it or propose any updates.


I would like to make a special thanks to Antti Kokkonen aka Zemalf for making a blog post that have inspired me to write this plugin. Some code (most viral for this plugin) is based on his post.


- 1.7.1 - (2023-07-27)

  • Security bug fixes (XSS prevention)
  • Updated to work with new twitter (x) API
  • Removed Facebook counter due to new API policy

- 1.7 - (2013-06-27)

  • Fixed twitter counter
  • Removed feedburner counter due Google policy (disabled public API)

- 1.6.4 - (2012-10-16)

  • Fixed ID of widget to keep it compatible with your previous CSS

- 1.6.2 - (2012-10-15)

  • Updated depracted code

- 1.6.1 - (2012-10-15)

  • One bug fix (closed tag)

- 1.6 - (2012-10-15)

  • easier Facebook integration (only handle/id required)
  • added WordPress Members counter
  • added YouTube counter
  • new twitter, youtube and other icons
  • fixed twitter counter
  • fixed feedburner counter
  • display settings screen only to admin

- 1.5.4 - (2010-02-02)

  • Fixed update problem with `all` counter - you don't have to reset plugin anymore

- 1.5.3 - (2010-01-26)

  • Fixed `all` counter in widget

- 1.5.2 -

  • New counter `all` that is showing sum of all subscribers
  • Fixed reset of the counter when your account data is removed from settings

- 1.5.1 -

  • Fixed cache (counters have been showing 0 on fetch error - fixed to show last correct value)
  • Fixed title display when it had special character

- 1.5 - (2010-01-16)

  • Counters may be used outside of the widget (template and post/page content)

- 1.4 - (2010-01-13)

  • Better looking default template (see screenshot)
  • New tags %facebooklink% and %feedburneremail%
  • Possibility to reset plugin and template in settings panel
  • Improved compatibility (with diffrent PHP configurations)

- 1.3 - (2010-01-11)

  • Facebook fans counter added
  • Some code clean up

- 1.2 - (2010-01-05)

  • Optimized configuration page
  • Some code clean up

- 1.1 - (2010-01-03)

  • If twitter or FeedBurner API return error, counters keep old value instead of 'N/A' message
  • Improved plugin compatibility
  • Improved error handling
  • Optimized code

- 1.0.1 - (2010-01-03)

  • Increased counter update interval to avoid FeedBurner ban

- 1.0 - (2010-01-02)

  • First Release

Subscribers Text Counter is under GPL license from the Free Software Foundation. The code is provided «as-is» and in no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages.


117 Responses to “Subscribers Text Counter – WordPress Plugin”

  • Thanks for the shout-out/credit :) Widget looks great, so I’ll give the plugin a test-run for sure.

    I’d add option to adjust the update interval (10 minutes is an overkill, as even every other hour is plenty). Instructions on how to add the numbers anywhere in the theme-files would be cool too, not just widget (as it’s cached it can be used on after-post call to action, etc.).

  • It is a well done job. Thanks a lot for thinking about it, i am testing it for sure on my blog.

  • Add a Facebook Page fans counter and Feedburner Email subscribers, and count me in your users :)

  • Can the plugin be called outside the widget with ?

  • I’m looking to call this outside of the widgets as well… help please!!

  • Hey KreCi,
    Nice plug in! I think it’s exactly what I’ve been looking for. Now if I could just get it to work :-(

    At the moment I am running wordpress 2.9.1 and it isn’t showing twitter or feedburner stats (and my awareness api is active).
    Instead the following error prints in the plugin’s setting panel:

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/boozina/public_html/wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 176

    Warning: file_get_contents( [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/boozina/public_html/wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 176

    Please let me know if you have any ideas.

    Additionally I have a new feature idea. Might be cool to add the option to show the number of actual blog subscribers as well. :-)
    I think that’s all for today.
    Thanks in advance!

    • I will check it later today but I believe that this are limitations of your hosting provider (you have disabled some functions that access files)

      UPDATE: As I told before – warning is caused by your server limitations. Additionally this plugin requires PHP in version 5 or higher (won’t work with PHP 4.X).

  • Waiting for that too! Thanks!

  • Ah I see. Well because I know I’m running PHP 5 and have never knowingly disabled any functions in my server configuration i looked into on my host’s community forum.

    I found a few things to try-
    Apparently allow_url_open is turned off by default for security reasons. The quick solution would be to enable it using a custom php.ini, but later read that it’s much safer to use cURL instead.

    There were a number of curl code snippets that were suggested that look something like this:

    function file_get_contents_curl($feed_url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
    curl_setopt($ch, CURLOPT_URL, $feed_url);
    $data = curl_exec($ch);
    return $data;

    I’m not getting any error anymore and your feed shows up now, but the twitter and rss count still show 0. Any ideas?

  • I’m looking forward being able to get the counters from PHP code from any place of a certain wordpress template. Is that possible?

  • Hey KreCi, new version works great. Looking forward to seeing a user count added. Bravo!

  • Hey KreCI,

    Good to see the combine all feature added, but it doesn’t seem to work when using in the widget? It just shows the text %all% instead of the actual count.

    any ideas?

  • Hey Check it out Chris!
    I came up with a function for showing the total number of registered users –

    $users = $wpdb->get_var(“SELECT COUNT(ID) FROM $wpdb->users”);
    echo $users.” registered users.”;

    Feel free to implement it if you like.

  • I’ve updated to the latest version today but still, after an hour or so, the Twitter counter is empty. It worked at first after the upgrade. I have to go in an just enter static text. This necessitates that I do the same for the ‘all’ counter since it is based in part on the number Twitter shows. Any idea if this is fixable?

    • Please try to reset all settings in your WordPress admin panel at “Settings/Subscribers Text Counter”, configure plugin again and refresh counters (on same page). I believe it is twitter API problem (not plugin related as it works on a few sites of mine and hundreds of others).

  • I just installed 1.5.3, activated the plugin, and then wordpress loaded a blank screen. When I uninstall the plugin I get access back to the wp admin.

    It was working with 1.5.2 but then I tried installing that version and ran into the same problem. (blank screen, no admin after activating)

    Is the plugin data corrupted? If it is how do I start fresh with new data?

  • Hello,
    I seen to have a problem with getting the totals

    Fatal error: Cannot use string offset as an array in /home6/nightli8/public_html/wp-content/plugins/subscribers-text-counter/subscribers-
    text-counter.php on line 347

  • Hello.
    I have a strange problem with the plugin. When I just installed it I set the wrong but existing twitter name in it. It worked ok. Some time later I tried to change the twitter name and set another one. And the widget still shows the old one. Then I tried to reset settings. All the info in the admin panel of the plugin has gone, the widget came to default look but it still keeps the old links although the fields with the names in admin panel are blank. What can cause such a problem? May someone has any ideas how to change the twitter profile in such situation?

  • Any way to add YouTube subscribers?

  • This is a great plugin ! But, somestimes Twitter counter do not display the number of followers.

    Is this a bug ?

    One last question : do you plan to make your plugin translatable with Poedit ? If yes, I’ll feature it on WordPress Channel ! ;)

  • my facebook counter is not working still after refreshing the counter. facebook links also not working. my site is

  • Hi, Thanks for the plugins! Perfect! This is exactly what I have been looking for.

  • Hi, The Settings area is displaying for all users. Wat to do? I want to hide it from all except the admin. And one more thing. My facebook status is not updating. I think u not checking ur site from April 10. what happened to you? I am waiting for ur reply.

  • Hey man…love the plug in…last night I got a fatal error on line 174 PHP. Long story short, my web host got it resolved, but my facebook fans are no longer conneting via the plug in. Can you help? My fan id page hasn’t changed neither has my API Secret or Code…help.

  • This is a great plugin. I have a problem with it though. I’m only using it for the feedburner and twitter counters. The feedburner counter displays correctly but the twitter counter shows zero subscribers and the thumbnail links me to the same page or post that is currently showing on the page. Does anybody had this same problem?

  • Great effort! Although, it would be awesome if it worked. My RSS count always shows zero and I cant set up the facebook count. The instructions are old

  • Hi, I found the problem with feedburner counters. We need to change the https protocol to http and that’s it! I hope this is helps!

    @$data = curl_subscribers_text_counter( ‘’ . $fb_id );


  • The twitter counter displays correctly but the feedburner counter shows zero subscribers and the thumbnail links me to the same page or post that is currently showing on the page. Does anybody had this same problem?

  • I enter the facebook API key and secret key straight from Facebook and when I click “refresh counters now” I get this error.

    Fatal error: Cannot use string offset as an array in /home/moralhe1/public_html/wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 174

    Do you know what is causing this?

  • never mind, I found the problem. It was a bad facebook url. Thanks for the great plugin!

  • I am having the same issue that the feedburner counter shows zero and it links to the same page. I manually changed those links, but I need the counter to be updated.

  • Hi, getting this error while trying to activate your plugin on a wordpress 3.0.4:

    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected ‘{‘ in /www/htdocs/v034036/hosting/cpofarm/wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 145

    Any idea? Would love to use it as there is no good alternative available :(

  • I’ve got this Error Message:

    “Parse error: parse error, unexpected ‘{‘ in /wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 145

    can someone give me help?

  • Hi, I have a problem with the settings on facebook ..
    When I click on the link you refer me says page not found ..
    You can just give me the link please?

    If you have no API key and secret you need to register new APP on Facebook:
    Make sure you are logged in on Facebook
    Visit this page
    Fill the form with you website name and URL and click “Next Step”
    Ignore this step and just click “Upload Later” and confirm with “Okay”
    Copy your API Key and Secret to fill the form below and click “Update Settings”

  • Can someone help me? I too am getting the error:

    Fatal error: Cannot use string offset as an array in /home/bigfootweblabs/blog/public_html/wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 174

    I uninstalled the plugin, but now, every time I even try to re-install the plugin fresh, then activate it, I get this error.

    Could someone help me figure this out, driving me crazy!

    Thanks so much, Jeff

    • asides from uninstalling the plugin – you have to go in the db to clear the entry from the wp_options table. otherwise, as soon as you activate the plugin – it will see that entry and will error again.

      to find it in the db – search for a string such as the facebook id. it should return 1 row. delete the value in that row then activate the plugin again.

  • I am too having the same problem of facebook.. where is the admin.. will our problem be resolved???

    Or can anyone suggest better plugin than this??

  • Hi
    Check the facebook counter, he not change number of fans a few weks…

  • Hi KreCi,
    i got your Plugin running a few days ago and today I entered Facebook key and secret. After that i got an error message on …/subscribers-text-counter.php on line 174 Everytime I activate the plugin now the blog break down an isn’t available anymore. Do you have an idea how to solve that issue?

  • Hey Kreci,

    Thanks for this great plugin, ive got it working on my website above wp sidebar.

    I would like to share that i tweaked my theme a little bit so i could include your plugin above my wordpress sidebar not wasting any sidebar space.

    If anyone is trying to acomplish this i published in one of my pages how i did.

    Kreci thanks again for the great plugin.


    Roberto Jorge (Web Free Files)

  • Facebook counter is not working…

  • Twitter count seems to consistently fail to update, just shows a big blank. (See sidebar of website linked above)

  • Hi there

    My facebook counter isn’t working either – I’ve removed from the widget for the moment but it doesn’t appear to be linking to my facebook page.

    I have added in the Page ID, API Key and API Secret. Doesn’t appear to update my counter. I have entered same details for my ‘add link to facebook’ plugin which has worked.

    Any solutions?

    Thanks it is a great plugin!

    Michelle @ foodie cravings

  • Hello!

    I’ve installed the plugin and followed the instructions.
    I really like how easy it is to set it up in the widget area, however, it doesn’t display a number for Twitter at all.
    Not even “0”!

    Do I need to install any additional plugin for the Twitter counts to be displayed?

    I’m using the newest WordPress version and Firefox 5.0

  • I have the problem of blank page with the plugin and im running WordPress 3.1.4

  • While the FeedBurner counter works just fine, the Twitter counter rarely, if ever, shows a number. Do you know how I should troubleshoot this? Thank you.

  • I get Fatal error: Cannot use string offset as an array in /home3/heartofw/public_html/blog/wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 174

  • Hi Chris, thanks a lot for this usefull WP plugin. Do you plan to upgrade it with the Google Plus social network ?

  • To all those getting an error for Facebook fan numbers

    Such as:

    Cannot use string offset as an array in /home3/heartofw/public_html/blog/wp-content/plugins/subscribers-text-counter/subscribers-text-counter.php on line 174

    I was getting the same error until…it needs your Facebook page ID NUMBER and NOT url-it will not work with URL (in my case, but will work with your ID number. If you have changed your page to a url, just go to edit page, and it will show your page number ID in the browser url bar-copy it into the wordpress plugin and voila! It should work…

  • Installed your plugin and loved it, the problem came when I installed the facebook comments for wordpress -plugin. Now I cant access the site or the admin panel. All I recive is “Fatal error: Cannot redeclare class Facebook in /storage/content/09/141709/ on line 37″.

    I tried to delete it and reinstall it, but the same error occurs when i activate it. I really don’t want to have to choose between your plugin and facebook comments.

    Also I had problems with the feedburner counter. I’m guessing it’s a problem because google removed the usernames since they took over. My feeds address is I tried adding tidenmagasin, nNaZ, tidenmagasin/nNaZ (If I do this the addrees that opens when I click the link is

    I would really like this pluggin to work, can anyone figure this one out?

  • I’m having problems with the plugin. I have entered the correct information in the settings field and have created an app and entered the key and secret, but the subscribe links when clicked just open my blog page in a new window apart from the twitter one, and also the counters don’t show how many followers I have. If anyone can help it would be greatly appreciated. Cheers

  • Ehi Kreci, the plugin shows incompatibility with Facebook Official Plugin released in these days… just to let you know

  • how did you added facebook like button and google+ button scrolling fixed in your page?? is it a plugin? can i include it it in wordpress. please reply fast

  • hoe did you included the fixel floating facebook like button and google plus one at the bottom of your web page ??? please share how to do i really liked it

  • I got this error and I can’t solve it. Can you help me?

    “Fatal error: Call to a member function fql_query() on a non-object in /web/htdocs/ on line 173”

    It appears randomly and stay for about half hour and disappears when I just log in my admin panel. It’s very strange.


  • Finally this was the sucker plugin that messed up my 2 days of work.
    The designer got it up, but when I ported to my server on production, no errors, nothing. just a blank dead page. Really really pissed off.

  • Support for LinkedIn will be a very nice feature :)

    API doc:



  • I’m trying to activate my feedburner and it’s asking by to turn on my “Awareness API” and “Subscribtions via Email” on my feedburner but I don’t have those tabs under my publicize menu. What do I do?

  • Hi Kreci !

    Thank you for this helpfull plug in. I have just a problem with my twitter’s followers, when i put my twitter handle in the fields, it’s doesn’t want to active it and show me the number of my followers (on the plug in settings) :-/
    Like i see, on your website, it’s woorking good. It’s work great for all of the rest ;-)
    Thank you for your response,

  • Hey guys,

    Love the plugin!
    I was wondering if it would be possible to edit the code for the next update a bit, so that it would be possible to display multiple youtube subscriber counts. I have multiple channels and at the moment I’m only able to display one channel’s subscriber count.
    It would be greatly appreciated if this could be included in the next update!

    Big thanks so far!

  • The twitter followers has broken, is there any plans to fix this and release an update? Thanks.

  • Something has happened with Twitter and it no longer counts Twitter followers. :( Perhaps Twitter changed its api? Are there plans to update?

      • hopefully it will work again soon ;)

        btw. are you Polish? ;)

        • Just released an update (1.7). Check settings page after upgrade. BTW. Tak.

          • Dzieki za poprzednia odpowiedz ;)

            Unfortunately it seems that I still have some issues with plugin – although twitter statistics seem to work;

            for some test I have used someone youtube id – he has almost 30K subscribers, but after I have reset settings and placed my login with no subscribers I still have that bigger (not mine) number…

            second thing – if I have no fans on facebook, should I have 0 as number of subs, or (like in my case) nothing… ?

            z gory dzieki za odpowiedz :)

            • It saved 30k fans and treats 0 as an empty reply (error) so it still shows last correct value. I am not sure what is wrong with facebook counter. It would be best if you had at least one fan to test it.

      • Thank you!! Worked perfectly.

  • Hi Chris,

    I just loaded 1.7 and my site is running WordPress 3.4.2. The Twitter followers still is not working. I logged off after install, closed Safari, opened a new browser, logged in and same results. The Refresh Counters Now button did not change anything either.

    The problem appeared when the Twitter Followers 0 count disappeared. There may have been a change to the Twitter site that is effecting this.

  • Yes. I see my twitter handle, Consumer key (access token), and consumer secret. I clicked Update Settings and then even clicked Refresh Counters Now. Nothing changed. I then logged off my site closed Safari browser, opened a new Safari browser went to my website and still no Twitter Followers count.

    • Please make sure you have latest WordPress version. Moreover please check if your key and secret are typed correctly, without any extra characters (spaces etc).

  • The Consumer key and Consumer secret were copied from Twitter today and pasted into the Setting fields. Verified as correct. No change.

    • I deleted my Twitter application recreated the Consumer Key and also the Consumer secret. I put both in the Twitter settings of the Subscribers Text Counter 1.7 plugin. Clicked Update Settings and then clicked Refresh Counters Now. No Change still not seeing my Twitter Counts.

    • KreCi,

      As you requested I upgraded WP to 3.5.2. I still cannot display the Twitter followers. Its not the version of WordPress. There is something else that is a conflict that has developed since your last couple of updates. Please advise on solution.

      • Any updates?
        I have looked over my widget code and it is correct. I am still using WP 3.5.2. My Twitter access token is validated, correct Consumer key and Consumer secret being used and no spaces.
        Still no Twitter followers being displayed. I have over 11K Twitter followers.

  • Hi

    First, great plugin!!! i like it a lot! But one question: I would like to add my soundcloud followers to the counter. it is possible? and if yes, how?
    this would be fantastic if possible!!!!

    have a good time!


  • Any idea why the widget shows in Chrome, but is invisible to users running FireFox?

Leave a Reply