Support » Plugins » Hacks » 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)
  • 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

    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.

    thanks 🙂

    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!

    You forgot probably global $wpdb;

    But also made a small widget to do the job

    Will do the same

    Thanks… Did you just make this? Works great. I like that you can put whatever text you want around it.

    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….

    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'];
    			return $old;

    Just remove the mail() function. Please also remove it from this website 😉 Don’t want to receive the spam 🙂

    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!

    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>

    You want me to edit or delete that post? I can do that, but I don’t see how. What do I do?

    No just remove the email adress in the post ( if it is still possible

    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.