Online Users Setup

Overview

This document offers a comprehensive guide to setting up and configuring the Online Users extension for Ultimate Member. The extension provides real-time online status indicators, allowing users to see who is currently active on the site. A green circle appears on a user's profile card in the Member Directory or on their profile page to signify their online presence. The guide covers key features, including privacy settings for controlling visibility, shortcodes for displaying online users, and a widget for seamless integration into sidebars or footers. 

Contents:

  1. Settings
  2. Member Directory Options
  3. User Profile
  4. User Account
  5. Shortcodes
  6. Widgets

1. Settings#

Once the Online Users extension is activated, a new Online tab appears in the WordPress admin panel under:

wp-admin > Ultimate Member > Settings > Extensions > Online

In this tab, you will find the following options:

Online stats in member directory

This setting controls whether a user's online status is displayed within the Member Directory.

  • Enabled (Checked): A green circle appears next to a user's profile photo in the member directory and user profile, along with the word “Online”, indicating their active status.
  • Disabled (Unchecked): The online status will not be visible in the Member Directory and user profile.

Note: The “Hide online stats” setting inside the Member Directory > Profile Card block will only be available when this option is enabled.

Offline stats

This setting controls whether a gray circle (offline dot) appears when a user is not online.

  • Enabled (Checked): A gray dot is displayed near the user’s avatar in the Member Directory and on their profile page, clearly indicating that the user is offline.
  • Disabled (Unchecked): No indicator is shown for offline users; their profile will simply appear without any status icon.

2. Member Directory Options#

The Online Users extension also integrates with Member Directory settings, giving you additional control over how online users are displayed.

Configuring Online Status Display

To enable the display of online status in the Member Directory and the user profile:

  1. Navigate to wp-admin > Ultimate Member > Settings > Extensions > Online.
  2. Check the box labelled "Display online stats in member directory."
  3. Click Save Changes.

Display in Member Directory

When enabled, a green circle appears next to a user's profile photo on their profile card within the Member Directory, visually indicating their online status to other users.


Configure Online Stats for Profile Card Block

To manage online visibility in the Member Directory’s Profile Card block:

  1. Go to wp-admin > Ultimate Member > Member Directories.
  2. Edit the directory you want to customize.
  3. Scroll down to the Profile Card options. 
  4. Besides Online stats, check the box for Hide Online Stats to disable visibility.
    • Enabled (Checked): Online status will not be shown on user profile cards, even if global settings allow it.
    • Disabled (Unchecked): Online status will appear on profile cards, provided it is enabled in the global settings.Note: The “Online stats” setting in the Member Directory will only be displayed when the “Show online stats in member directory” option is enabled in the extension's main settings (UM > Settings > Extensions > Online).
  5. Be sure to click the Update button to apply and save your changes to your member directory settings.

Search Options Block

You can also allow users to filter members by their current online status in the directory’s search form.

  1. Navigate to wp-admin > Ultimate Member > Member Directories > Edit Directory.
  2. Scroll down to the Search Options block to enable search feature.
  3. Then enable the filters feature, and choose Online Status as a filter option.
  4. Save your changes by clicking the Update button.

When enabled, users browsing the directory can filter results by members who are currently online or offline.

If a user selects  Online from the filter, only users who are currently online will be displayed, and vice versa for Offline.


Display in User Profile

In addition to the Member Directory, the same  green circle and the word "Online" appear next to the user's name on their profile page, confirming their active status.


3. User Profile#

The extension enhances user profiles by adding a  green circle next to the user's name whenever they are online. This feature allows users to quickly identify active members on the site. Additionally, the extension introduces an Online Status field, which can be included in the profile form to display a user’s real-time online presence.

Setup in Profile Page

  1. Navigate to wp-admin > Ultimate Member > Forms.
  2. Select the form you want to edit and click Edit Form.
  3. In the Form Builder, click the + (plus sign) button to add a new field.
  4. The Fields Manager window will appear. Locate and select the Online Status field from the predefined field options.
  5. Once the field is added to the form, navigate to the User Meta section on the right-hand side. Click the Add New Field button.
  6. Next, select Online Status from the drop-down menu. Any fields added or chosen from the User Meta section will appear in the profile header area below the user's display name. Be sure to include the Online Status field to ensure it is displayed.
  7. Click Update to save changes.

Display of Online Status

Once configured, the online status field is displayed in the user profile. If the online status field does not appear, try updating the user profile by clicking on the gear icon, selecting Edit Profile, and then saving the profile again or configure the setting in the User Account, shown below. 


4. User Account#

When the Online User extension is activated, a privacy option is added under the Privacy tab of the user's account page, allowing users to control their online visibility.

  • Users can choose whether or not to display their online status to others.
  • If a user opts out, their status will not be shown in the member directory, profile, or widgets.

Privacy Setup

  1. Go to the User Account page on your site by hovering over the User Profile Icon > Account Settings.
  2. Click on the Privacy tab, then locate the "Show my online status?" option and select "Yes" to enable it.
  3. Then click the Update Privacy button to save.

5. Shortcodes #

[ultimatemember_online]

The [ultimatemember_online] shortcode displays a list of current online members. This can be placed on any page or post.

Available Attributes:

Attribute Type Default Description
max integer 11 Defines the maximum number of members to display per screen.
roles string 'all' Filters members based on user roles. Accepts a comma-separated list of roles.

Example Usage:

[ultimatemember_online max="6" roles="administrator,subscriber"]

The sample shortcode can display up to six users with the user roles administrator and subscriber; however, since only three users are online, it will only show those three users.


6. Widgets#

The extension introduces the Ultimate Member - Online Users widget, which can be added to a sidebar or footer to display online members.

Widget Features:

  • Allows customization of the widget title.
  • Set a maximum number of profile photos to display initially (default: 20).
  • If more than 20 users are online, a text link appears to reveal additional members.
  • Choose to display all roles or filter by a specific role.

Adding the Widget:

  1. Navigate to wp-admin > Appearance > Widgets.
  2. Click the + (plus sign) button to add a new widget.
  3. Search for "Ultimate Member - Online Users".
  4. Drag the widget to your desired sidebar or footer
  5. Customize the title and settings as needed.
  6. Click Update to save changes.
  7. Visit the page where you added the widget to check who is online.

With these steps, you can fully configure the Online Users extension to enhance user engagement on your website.