WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get user count

Contents

Description

The number of active users in your installation.

The count is cached and updated twice daily. This is not a live count.

Usage

<?php get_user_count() ?>

Parameters

This function does not accept any parameters

Return values

(integer) 
The number of active users

Examples

<?php
  $user_count = get_user_count();
  echo "There are currently $user_count users on this site.";
?>

Notes

Change Log

Since: 2.7

Source File

get_user_count() is located in wp-includes/ms-functions.php

Related

 

See also index of Function Reference and index of Template Tags.
This page is marked as incomplete. You can help Codex by expanding it.