Skip to content

Notification Dynamic Tags

The Notification Dynamic Tags add new dynamic tag properties for accessing user notification and message counts. Display unread counts anywhere on your site using Voxel’s dynamic data system.

Overview

These dynamic tags extend Voxel’s user data properties to include notification and message counts. Use them in templates, widgets, or anywhere dynamic tags are supported to display personalized notification information.

Key Features

  • Access unread notification count via dynamic tags
  • Access unread message count via dynamic tags
  • Works with current user data
  • Use in any element supporting dynamic content
  • Combine with conditional logic for dynamic displays

Available Tags

TagDescriptionReturns
@user(unread_notifications)Number of unread notifications for the current userNumber
@user(unread_messages)Number of unread messages for the current userNumber
TagDescriptionReturns
@author(unread_notifications)Number of unread notifications for the post authorNumber
@author(unread_messages)Number of unread messages for the post authorNumber

Setup Instructions

Step 1: Enable the Function

  1. Navigate to Voxel Toolkit → Dynamic Tags in your WordPress admin
  2. Find Notification Tags in the list
  3. Toggle the switch to enable
  4. Click Save Changes

Step 2: Use the Tags

Once enabled, use the tags in any element that supports dynamic content, such as:

  • Elementor text widgets with dynamic tags
  • Voxel template buttons and links
  • Menu items with dynamic labels
  • Conditional visibility rules

Use Cases

Custom Notification Badges

Create custom notification badges in your header or navigation that match your site’s design.

Dashboard Widgets

Display notification counts on user dashboard pages to keep users informed.

Conditional Navigation

Show or highlight menu items based on whether the user has unread notifications.

Welcome Messages

Include notification counts in personalized welcome messages for logged-in users.

Troubleshooting

Tags Not Showing Data

  • Verify the user is logged in (tags return 0 for guests)
  • Check that the Notification Tags function is enabled
  • Ensure the tag syntax is correct
  • Clear any object caches

Count Seems Incorrect

  • Counts reflect the Voxel notification system data
  • Check user meta for voxel:notifications and voxel:dms
  • Mark notifications as read to update the count

Tags Not Available

  • Ensure Voxel Toolkit is active
  • Tags register under the @user group
  • Check that dynamic tags are supported in the element you’re using

Built by Code Wattz.