[![How to Show the Number of Registered Users on Your Site 1](https://coma.lv/wp-content/uploads/2025/11/users.webp)](https://coma.lv/wp-content/uploads/2025/11/users.webp)

# How to Show the Number of Registered Users on Your Site

Oct 25, 2025/by [Vadim Pavlovich](https://coma.lv/en/author/djcoma/)

Have you ever wanted to show how many people have decided to register on your site? This kind of information works great as social proof and often encourages new visitors to join. In this article you will learn how to display the number of registered users in WordPress in two simple ways.

## Method 1. Show the Number of Registered Users with a Plugin

First you need to install and activate [Simple Blog Stats](https://wordpress.org/plugins/simple-blog-stats/). If you have not installed plugins before, we advise you to take a look at our step-by-step guide on [how to install a plugin in WordPress](https://coma.lv/en/2024/08/21/how-to-install-a-plugin-in-wordpress-a-step-by-step-guide-for-beginners/). After activation, go to **Settings > Simple Blog Stats**.

![WordPress](https://coma.lv/wp-content/uploads/2025/11/Ekranuznemums-2025-11-23-081043.jpg)

This plugin lets you show various statistics about your site. Open the shortcodes tab, scroll down to **number of users** — there you will see the shortcode:

[sbs_users]

![WordPress](https://coma.lv/wp-content/uploads/2025/11/Ekranuznemums-2025-11-23-081301.jpg)

On either side of the shortcode there are two text fields — HTML before and after the user count output. By default the result will look, for example, like this:

<span class="sbs-count-users">856</span>

Just copy the shortcode and click the save button. Now you can use it in any post, page or widget. If the shortcode does not work in your sidebar, take a look at our guide on how to properly enable shortcode support in widgets.

## Method 2. Show the Number of Registered Users Manually with Code

If you prefer your own solution or want minimal code without third-party plugins, you can use a shortcode with optimized code that includes caching and built-in HTML markup. You can add the code to your own mini-plugin or to your theme’s functions.php:

// Function to get the total user count with caching function wpb_user_count() { // Check if the count is cached $cached_count = get_transient(&#039;wpb_user_count&#039;); if ($cached_count !== false) { return &#039;&lt;span class=&quot;user-count&quot;&gt;&#039; . esc_html($cached_count) . &#039;&lt;/span&gt;&#039;; } // Get the total number of users $usercount = count_users(); $result = $usercount[&#039;total_users&#039;]; // Cache the result for 1 hour to reduce database load set_transient(&#039;wpb_user_count&#039;, $result, HOUR_IN_SECONDS); // Return the result wrapped in HTML for easy styling return &#039;&lt;span class=&quot;user-count&quot;&gt;&#039; . esc_html($result) . &#039;&lt;/span&gt;&#039;; } // Register the shortcode add_shortcode(&#039;user_count&#039;, &#039;wpb_user_count&#039;);

This code creates the [user_count] shortcode, which you can use in posts, on pages or inside a sidebar widget to display the number of users of your site. The number is output with the HTML class user-count, which makes it easy to style with CSS. For example, you can add this to a theme file or to custom CSS:

.user-count { font-weight: bold; color: #2a9d8f; font-size: 1.2em; }

You can use the shortcode directly in the text of a post or page:

Join [user_count] other users who share your interests!

As a result, the user count will be nicely formatted according to your styles.
In our case it looked like this:

![WordPress](https://coma.lv/wp-content/uploads/2016/10/usercount-preview.jpg)

Additionally, you can add a registration button that leads to your custom registration page — this approach works great when you want to increase conversion.

---

*Our specialization is WordPress website development and maintenance. Contact us for a free consultation — [vadim@coma.lv](mailto:vadim@coma.lv), [+371 29394520](tel:+37129394520)*

---
