Of course, you often see several sites showing how many users or users are online on the site. Do you want to show the number of users or online users currently visiting your WordPress site? mostly on community sites and forum mostly using widgets to display the number of users who are online. In this article, I will show you how to display online users widgets in real time in WordPress.
Displaying WordPress Users Online
To display the number of online users on wordpress, the first thing you need to do is install and activate the plugin WP Useronline. After you activate, please enter the page Settings »UserOnline to configure plugin settings.
On this settings page, you can change the default plugin settings. These settings include time settings, User online URL, and Display.
The default settings will work for most sites, so you only have to click a button Save Settings at the bottom of the page if you don’t want to make changes.
The next step is to create a page where you want to display the users who are currently online on your WordPress site. Create a new page or page by going to the menu Page »Add New.
You can give the new page a title name as you like, but the page URL slug must be the same as what you have in the plugin’s settings. Click the Edit button next to the URL slug and change it to useronline.
After that, please add the shortcode of this plugin in the editor area of your page [page_useronline]. Now please publish the page.
Displaying User Online on Widget
This plugin provides two ways to display online users on your WordPress site. The first method is recommended for beginners. Please enter the menu Appearance »Widget. Next, drag and drop the User Online widget from the list of available widgets to your sidebar, and select one of the settings provided that you want.
Meanwhile, another way is to use the code below and put it in the wordpress theme file that you are currently using where you want to display the online users.
Using this second method, of course, you will need expertise to create custom CSS to make it look attractive and blend with your site.
Here is a tutorial showing online users on the WordPress site, I hope this article was useful for you and good luck. 🙂