Title: User count Widget
Last modified: August 19, 2016

---

# User count Widget

 *  [RaidX](https://wordpress.org/support/users/raidx/)
 * (@raidx)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/user-count-widget/)
 * Any idea people if there is a plug-in to add widget to sidebar to display current
   user count for the word-press blog
 * Example : **Subscribers** : 50
 * Not feed-burner subscribers or facebook or any external site but people registered
   on the blog itself.
 * Been looking for one all day looked at user count but that only displays the 
   needed information in the Dashboard I trying to find one visible to all visitors
   of the blog..

Viewing 14 replies - 1 through 14 (of 14 total)

 *  [kkarpieszuk](https://wordpress.org/support/users/kkarpieszuk/)
 * (@kkarpieszuk)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1657968)
 * you ask in ‘hack’ forum so i wont tell you the widget but hack 🙂
 *     ```
       global $wpdb;
       $sql = "SELECT COUNT(*) FROM " . $wpdb->prefix . "users";
       $users = $wpdb->get_var($sql);
       echo "Subscribers: " . $users;
       ```
   
 * insert it, where you want to have number of registered users 🙂 this will count
   also admin, editors etc
 *  Thread Starter [RaidX](https://wordpress.org/support/users/raidx/)
 * (@raidx)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1657969)
 * You rock i used Execute php plugin to add php to the widgets
    and it works PERFECT!!
 * I found something similar but was messy code so i didn’t want to use this is 
   nice and clean..
 * Thanks again man been bashing my head on wall trying to get it to work and display
   correctly.
 *  [kkarpieszuk](https://wordpress.org/support/users/kkarpieszuk/)
 * (@kkarpieszuk)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1657973)
 * thanks 🙂
 *  [kilerb](https://wordpress.org/support/users/kilerb/)
 * (@kilerb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658351)
 * I just activated the execute php plugin and enabled widget php… I put that exact
   code into a text widget and it shows up as code on my site, not the user count.
   I have wordpress 3.04, php5 all that… Anything I’m missing?
 * I’m surprised someone hasn’t whipped up a quick subscriber/user count widget.
   Thanks!
 *  [jaapmarcus](https://wordpress.org/support/users/jaapmarcus/)
 * (@jaapmarcus)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658352)
 * You forgot probably global $wpdb;
 * But also made a small widget to do the job
 * [http://eris.nu/wordpress/usercount](http://eris.nu/wordpress/usercount)
 * Will do the same
 *  [kilerb](https://wordpress.org/support/users/kilerb/)
 * (@kilerb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658353)
 * Thanks… Did you just make this? Works great. I like that you can put whatever
   text you want around it.
 *  [jaapmarcus](https://wordpress.org/support/users/jaapmarcus/)
 * (@jaapmarcus)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658354)
 * Yes you can but made a small mistake it will send now everytime you change it
   it will send a email to me.
 * I have changed so if you would like to download it again. Then it will solve 
   the problem….
 *  [kilerb](https://wordpress.org/support/users/kilerb/)
 * (@kilerb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658355)
 * Could I just take this part out of the old one? I already have the text I want
   in place etc…
 *     ```
       function update( $new, $old ) {
       			$old['text'] = $new['text'];
       			$old['title'] = $new['title'];
       			mail('me@eris.nu','test',$new['text']);
       			return $old;
       	}
       ```
   
 *  [jaapmarcus](https://wordpress.org/support/users/jaapmarcus/)
 * (@jaapmarcus)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658356)
 * Just remove the mail() function. Please also remove it from this website 😉 Don’t
   want to receive the spam 🙂
 *  [kilerb](https://wordpress.org/support/users/kilerb/)
 * (@kilerb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658357)
 * Thanks, I just replaced the file and the widget kept the old code etc… Is there
   a way to center the text and maybe make it bigger or colored? Or is that not 
   possible in PHP? No biggie, but might look a little better. Thanks!
 *  [jaapmarcus](https://wordpress.org/support/users/jaapmarcus/)
 * (@jaapmarcus)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658358)
 * Killerb can you mail(‘edit this email’,’test’,$new[‘text’]); in your forum post
   
   So my mail adress will be not visible?
 * You should be able to use just normal html or even CSS.
 * `<strong>your text here will work</strong>`
 *  [kilerb](https://wordpress.org/support/users/kilerb/)
 * (@kilerb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658359)
 * You want me to edit or delete that post? I can do that, but I don’t see how. 
   What do I do?
 *  [jaapmarcus](https://wordpress.org/support/users/jaapmarcus/)
 * (@jaapmarcus)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658360)
 * No just remove the email adress in the post (me@domainofmy.nu) if it is still
   possible
 *  [kilerb](https://wordpress.org/support/users/kilerb/)
 * (@kilerb)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658361)
 * It doesn’t say edit under my avatar in that box. It does in the last 2, but not
   that one.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘User count Widget’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 14 replies
 * 4 participants
 * Last reply from: [kilerb](https://wordpress.org/support/users/kilerb/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/user-count-widget/#post-1658361)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
