Do you want to display the number of registered users on your WordPress website? Displaying the number of registered users helps encourage other visitors to register as well. Stating a fact like this proves that other visitors are registering, so why should a visitor be the odd man out? It’s almost similar to peer pressure and is quite effective.
Showing this stat can also help show that your website is constantly growing. Loyal visitors who regularly check will see this stat grow, which is a great thing for them to see, but remember, it works both ways and they can see a decline as well. Today, I will demonstrate how to display the number of registered users in WordPress using two methods.
How to Handle WordPress Stats
Showing growth and popularity is never a bad thing and most websites brag about these stats whenever the possibility arises. However, you need to be careful, stats can show growth, but they can also show a decline. When this happens a common thought is to try and hide or remove the stats, but this may actually hurt you more because it shows that you do not have confidence that the decline will eventually stop.
Once you decide to show your stats off to the world, don’t stop doing so. No matter how big or small your website is, your website’s statistics are important to everyone. This includes your visitors and partners.
How to Display the Number of Registered Users in WordPress
Today, I will demonstrate how to display the number of registered users in WordPress using two methods. The first method is to use the Simple Blog Stats plugin. It’s a very easy plugin to use and the process is very quick. The second method is to manually show the number of registered users with code. Remember that every plugin will slow down your website, so using code is always a more effective way of adding features to your website.
Method 1: Installing Simple Blog Stats
Let’s start by going to the plugins area of WordPress and click on the Add New option.
Search for Simple Blog Stats in the available search box. This will pull up additional plugins that you may find helpful.
Scroll down until you find the Simple Blog Stats plugin and click on the «Install Now» button and activate the plugin for use.
On the left-hand admin panel click on Settings and select the Simple Blog Stats option. This will pull up the main settings page.
Using Simple Blog Stats
This plugin utilizes shortcodes to show specific stats on your website. These shortcodes can be placed on any page, post, or text widget on your website. Click on the Shortcodes section on the settings page.
This will reveal all of the shortcodes you can use with this plugin. You can share all kinds of stats like total posts, pages, post types, and much more. Locate the shortcode for the number of users and copy the shortcode, which should be [sbs_users}. Simply paste the shortcode wherever you want to display the number of users on your website.
Congratulations, you have successfully displayed the number of users on your website.
Method 2: Coding Approach
This approach will have the same result of the plugin but will require a simple code edit.
Let’s start by logging into the cPanel and clicking on the File Manager option. The File Manager will allow you to access all of the files related to your website.
You need to locate your theme’s functions.php file. Click on the public_html directory, then click on the wp-content folder. Inside of this folder, you will find all of the content related to your website. Click on the themes folder and enter the folder of the theme you are currently using. Finally, right-click on the functions.php file and select the Edit option.
A pop-up window will show up. This box will warn you to create a backup of your files before editing anything. This will ensure that you can revert your website back to when it was working if something goes wrong. Click on the «Edit» button. A new tab will open containing all of the code from the file.
Simply copy and paste the following lines of code into your functions.php file:
This will create a shortcode [number_of_users] that you can use on your website to display the number of users. Once you have inserted the code into the functions.php file, click on the «Save Changes» button to finish.
Congratulations, you have successfully added the number of users on your website without using a plugin. If at any time you want to remove this code, simply delete it from the functions.php file.
Share All of the Positive Stats You Can
If you look at any major website or company, you are likely to see all of the positive facts advertised. Showcasing good stats helps improve your website’s image and a better image means your visitors will help spread the word. It is a great way to show that everything is going right, but sometimes the stats may not be great and you need to be able to explain why or how you plan to turn the situation around.
Which method have you chosen to use? Was the method you chose easy to follow?
Author: Robert Giaquinto
Robert has been writing tutorials about WordPress and other CMS for over 3 years since joining the GreenGeeks marketing team. Thanks to this, he has had the opportunity to research and master several areas of WordPress including plugin usage, SEO, website design, and social media integration. When he is not creating content for WordPress, Robert is digging up new content ideas for environmental pieces. These range from the pollution in our air to the danger’s wildlife face. And with a bachelor’s degree in electrical engineering, he is always eager to discuss the way our technologies are affecting the environment, especially when it comes to solar energy.