Appearance
User Role Filter
The User Role Filter is a custom search filter for Voxel that allows users to filter posts by the author’s WordPress user role. This is perfect for directories, marketplaces, or community sites where you want to let users find content created by specific types of users (administrators, editors, subscribers, customers, etc.).
The filter automatically retrieves all WordPress user roles from your site and lets you control which roles are available for filtering. It supports multiple role selection and works seamlessly with Voxel’s AJAX search system.
Key Features
- Dynamic Role Detection: Automatically retrieves all WordPress user roles
- Selective Display: Choose which roles to make available for filtering
- Multiple Selection: Users can select multiple roles at once
- Two Display Modes: Show as popup dropdown or button group
- Search Functionality: Built-in search when you have 5+ roles
- Default Values: Pre-select specific roles in Elementor
- Custom Roles Support: Works with custom roles added by plugins
- Real-time Filtering: Works with Voxel’s AJAX search system
How to Add the User Role Filter
Step 1: Add Filter to Post Type
- Go to Post Type → Edit Post Type in WordPress admin
- Click the Filtering tab
- Click Search Filters
- From the selection, selectUser Role
- Configure the filter:
Basic Settings:
- Label: Display name for the filter (e.g., “Author Type”, “Posted By”, “User Type”, “Role”)
- Key: Unique identifier (auto-generated, usually user-role)
- Icon: Choose an icon to display next to the filter label
- Placeholder: Text shown when no roles are selected (e.g., “Filter by role…”)
Role Selection:
- Select roles to display: Check which roles you want users to be able to filter by
- Leave empty to show all roles
- Common roles: Administrator, Editor, Author, Contributor, Subscriber, Customer
- Click Save Changes
Step 2: Add to Search Form
- Edit your page with Elementor
- Find your Search Form (VX) widget
- The User Role filter will now appear in the available filters
- Configure display options:
Display Settings:
Display As:
- Popup: Dropdown overlay with checkboxes (recommended for 3+ roles)
- Buttons: Horizontal button group (best for 2-3 roles)
Default Value:
- Enter comma-separated role keys to pre-select (e.g., subscriber,customer)
- Role keys are lowercase versions of role names
- Common role keys: administrator, editor, author, contributor, subscriber, customer
Search & Selection:
- Automatically enables search when you have 5+ roles
- Users can select multiple roles
- Selected roles are shown as chips/tags
- Clear all selections with one click

