Have you ever wanted to display the total number of registered members on WordPress? Social proof like displaying registered members, encourages others to register on your website. In this tutorial, we will show you how to display the number of registered users on your WordPress blog.

Method 1: View the number of registered users with a WordPress plugin

This method is for those who do not want to waste time and prefer a quick fix. Indeed, for this solution, all you have to do is install the plugin " Simple Blog Stats »Available on WordPress.org. You can read our tutorial to find out how to install a WordPress plugin.

After activating this plugin, you need to access the " Settings> Simple Blog Stats To configure the plugin settings.

Simple blog stats plugin WordPress

This plugin allows you to display statistics different for your website. You need to click on the shortcodes to expand them, then scroll down to the shortcode “ Numbers of users As in the following picture.

Sbsusers list of shortcodes

You will notice that this shortcode is in this form « [Sbs_users] ". You will also notice that this shortcode will be wrapped with an HTML tag " chip ". You can leave that as it is, or customize this tag.

By default the generated code will be similar to this:

856

So you can add this shortcode to your page or article and even to a widget.

Method 2: How to display the number of manually registered users

This method is for those who like me are comfortable with code editing. If you have not done this before, then you can check out our tutorial on how to create a WordPress plugin.

All you have to do (when you already know how to create a plugin) is to add the following code to the latter

// Function to return user count function wpb_user_count () {$ usercount = count_users (); $ Result = $ usercount ['total_users']; Return $ result; } // Creating a shortcode to display user count add_shortcode ('user_count', 'wpb_user_count');

This code creates a shortcode that will be usable on WordPress (Articles, pages and widget).

This function does not add automatic formatting, it simply displays the number of users. You can wrap the short code with HTML code and even use CSS code, here is an example.

Join [user_count] other users who share your interest:

This is how it will look.

Usercount-preview example

That's all, you have successfully displayed the number of users registered on your WordPress blog. If you have any questions, do not hesitate, I will be happy to help you.