May 14, 2009

Display the total number of users of your WordPress blog




wordpress-logoPro Blog Tutorials has again brought to us another very useful and practical tutorial in the WordPress realm. With this simple code and WordPress hack, you will be able to show the total number of  users for your WordPress blog, anywhere you want in your template.

Just place the following code anywhere in your template for the number of registered users on your WordPress blog to be shown:

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

Aweber Email Marketing

Related posts:

  1. Display the total number of your Twitter followers on your WordPress blog
  2. How to Number Your Comments
  3. Display Today’s Date on your Blog
  4. Display your tags in a dropdown menu
  5. Display the Author Who Edited a Post Last


Previous Post and Next Post


Try HostGator Webhosting for 1 cent for the 1st Month Click here and enter "wordpress"

Leave a reply

* means field is required.

*

*