How to Show Total Number of Registered Users in WordPress

Have you ever sought after to display the overall quantity of registered customers in your WordPress website? Social evidence like appearing the quantity of registered customers in your website, encourages others to check in as smartly. In this text, we will be able to display you the way to display general quantity of registered customers in WordPress.

Method 1: Show Registered User Count Using a WordPress Plugin

First factor you wish to have to do is set up and turn on the Simple Blog Stats plugin. For extra main points, see our step-by-step information on how to set up a WordPress plugin.

Upon activation, you wish to have to discuss with Settings » Simple Blog Stats web page to configure plugin settings.

Settings page for Simple Blog Stats

This plugin permits you to display other stats out of your WordPress website. You want to click on at the shortcodes tab to extend it after which scroll down to the ‘quantity of customers’ row.

Users shortcode settings

You will see the shortcode [sbs_users] with two textual content fields on all sides. These textual content fields include HTML the plugin will upload earlier than and after the quantity of customers.

By default, the shortcode will output HTML like this:

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

If you’re not sure, then simply replica the shortcode [sbs_users] and click on at the save settings button.

You can now upload this shortcode to any WordPress submit or web page. You too can upload it to a sidebar widget. If the shortcode does now not paintings in the widget, then practice directions in our information on how to use shortcodes in your WordPress sidebar widget.

Method 2: Manually Show Number of Registered Users in WordPress with Code

This manner calls for you to upload code to your WordPress website. If you haven’t performed this earlier than, then see our novice’s information on pasting snippets from internet into WordPress.

You want to upload the next code to your theme’s purposes.php document or a site-specific plugin.

// Function to go back consumer depend
serve as wpb_user_count() { 
$usercount = count_users();
$end result = $usercount['total_users']; 
go back $end result; 
// Creating a shortcode to show consumer depend
add_shortcode('user_count', 'wpb_user_count');

This code creates shortcode [user_count] which you’ll use in your WordPress posts, pages, or a sidebar widget to show the consumer depend.

The serve as does now not upload any HTML formatting to the consumer depend and easily returns the quantity. You might need to wrap the shortcode round HTML to use CSS or fundamental HTML formatting. For instance:

<p>Join <robust>[user_count]</robust> different customers who proportion your passion:</p>

Here is the way it appeared on our demo website:

Showing total number of users in WordPress widget

Note: We added a unfastened signup button that redirected to a customized WordPress consumer registration web page.

That’s all, we are hoping this text helped you learn the way to display the overall quantity of registered customers in WordPress. You may additionally need to see our information on how to reasonable new consumer registrations in WordPress.

If you really liked this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You too can to find us on Twitter and Facebook.

Recent Articles

How To Set Different Wallpapers On Multiple Screens On MAC

Does this question pop in your head when you think of setting up multiple screens on MAC? If so, the next few...

5 Must-Have Android Apps for 2020

The digitization of most of the amenities of society was a breakaway from the traditional livelihood of the masses.

How To Rearrange Comments in WordPress

Rearranging feedback to show the newest one on most sensible is changing into a brand new development that an increasing number of most sensible...

How to Highlight Author’s Comments in WordPress

On maximum websites, it is rather arduous for customers to observe creator’s feedback. This is why many WordPress websites spotlight their creator’s remark by...

How to Add Categories and Subcategories to WordPress

WordPress comes with the facility to kind your content material into classes, tags, and taxonomies. One of the most important distinction between classes and...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here