If you’ve ever wanted to show how many users are online and visiting your site at one time, you can. There’s a plugin for it and it works great for community sites, forums and other types of interactive sites. Here’s how you can show real time users in WordPress.
Using the WP-UserOnline Plugin for WordPress
Before you do anything else, you will need to install and activate the WP-UserOnline Plugin. This plugin will allow you to show the number of online users on your WordPress site at any time.
After the plugin has been activated, you can access the settings by going to Settings>>UserOnline.
This area will provide all the configurations for the plugin.
When you find this page, you will have the ability to change any of the default settings. The settings you may want to change include time out, display setting and the users online page URL. However, the default settings will work for most. After you have made your adjustments, click the “save” button.
Now, you need to create a page to showcase the users found online at any given time. This is done by going to Page>>Add New.
This page can be called whatever you prefer, but the URL must match the URL within the settings for the plugin.
After you have changed the URL to match the one provided in your settings, you will need to add the shortcode to the content area. The shortcode s [page_useronline]. Now, you can publish the page.
Using the User Online Widget
If you prefer to show the users on your WordPress site in the sidebar, you can do that, as well. The plugin comes with a widget, which you can access by going to Appearance>>Widgets.
From this section you can drag and drop the UserOnline Widget to your sidebar.
It will display the number of users on your website at any time.
This is the easiest way to show how many users are on your WordPress website at any time. Just install the plugin and use either the page or the widget to display the number.