Skip to content

Online Status

The Online Status function tracks and displays real-time user online/offline status indicators throughout your Voxel site. Show visitors which users are currently active.

Overview

This feature adds online status indicators that show whether users are currently active on your site. The system tracks last activity timestamps and displays visual indicators in various locations including the dashboard, inbox, messenger, and admin areas.

Key Features

  • Real-time online/offline status tracking
  • Configurable timeout period (default 3 minutes)
  • Visual status indicators (green dot for online)
  • Display in dashboard, inbox, messenger, and admin
  • AJAX-powered heartbeat for accurate tracking
  • Last seen timestamps
  • Visibility rules for conditional display
  • Dynamic tag for author online status

Setup Instructions

Step 1: Enable the Function

  1. Navigate to Voxel Toolkit → Functions in your WordPress admin
  2. Find Online Status in the list
  3. Toggle the switch to enable
  4. Click Save Changes

Step 2: Configure Settings

  1. Click the settings icon next to Online Status
  2. Configure display locations and timeout
  3. Save your changes

Configuration Settings

SettingDescriptionDefault
Show in DashboardDisplay online indicators in user dashboardYes
Show in InboxDisplay online indicators in Voxel inboxYes
Show in MessengerDisplay online indicators in messenger chatYes
Show in AdminDisplay online indicators in WordPress adminYes
Timeout MinutesMinutes of inactivity before user is marked offline3 minutes

How It Works

Activity Tracking

  1. When a logged-in user loads any page, their last activity timestamp is updated
  2. A JavaScript heartbeat sends periodic updates to keep the timestamp current
  3. Updates are throttled (minimum 30 seconds between writes) to reduce database load

Online Status Check

A user is considered “online” if their last activity timestamp is within the configured timeout period. For example, with a 3-minute timeout, users are shown as online if they had activity in the last 3 minutes.

Visual Indicators

Online status is displayed as a small green dot indicator next to user avatars or names in the configured locations.

Dynamic Tags & Visibility Rules

Visibility Rules

Two visibility rules are available for conditional element display:

  • user:is_online – Check if current user is online
  • author:is_online – Check if post author is online

Dynamic Tag

Access last seen timestamp via dynamic tag:

@author(last_seen)
@user(last_seen)
@author(is_online)
@user(is_online)

Returns the date, and time when the author was last active.

Use Cases

Real-Time Communication

Show users which contacts are currently online before starting a conversation.

Service Availability

Indicate which service providers or businesses are currently active and likely to respond quickly.

Community Engagement

Display online community members to encourage real-time interaction and engagement.

Support Availability

Show support team availability to set expectations for response times.

Troubleshooting

Status Not Updating

  • Check that the function is enabled
  • Verify JavaScript is loading without errors
  • Ensure AJAX heartbeat is functioning
  • Clear any caching plugins

Indicators Not Appearing

  • Check that the display location is enabled in settings
  • Verify CSS is loading properly
  • Check for CSS conflicts with your theme

Users Always Showing Offline

  • Increase the timeout period in settings
  • Ensure heartbeat AJAX is not being blocked
  • Check that user meta is being updated (vt_last_activity)

Built by Code Wattz.