Appearance
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
- Navigate to Voxel Toolkit → Functions in your WordPress admin
- Find Online Status in the list
- Toggle the switch to enable
- Click Save Changes
Step 2: Configure Settings
- Click the settings icon next to Online Status
- Configure display locations and timeout
- Save your changes
Configuration Settings
| Setting | Description | Default |
|---|---|---|
| Show in Dashboard | Display online indicators in user dashboard | Yes |
| Show in Inbox | Display online indicators in Voxel inbox | Yes |
| Show in Messenger | Display online indicators in messenger chat | Yes |
| Show in Admin | Display online indicators in WordPress admin | Yes |
| Timeout Minutes | Minutes of inactivity before user is marked offline | 3 minutes |
How It Works
Activity Tracking
- When a logged-in user loads any page, their last activity timestamp is updated
- A JavaScript heartbeat sends periodic updates to keep the timestamp current
- 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)

