Visibility rules: Condition and restrict content
With Voxel visibility rules you can control visibility of any part of your site such as:
- Entire pages or templates
- Individual widgets, containers or parts of a page or template
- Post submission fields
based on a wide range of conditions available such as:
- Dynamic tag
- User is logged in
- User is logged out
- User membership plan is
- User role is
- User is author of current post
- User can create new post
- User can edit current post
- User is verified
- Author membership plan is
- Author role is
- Author is verified
- Post is verified
Widgets & Containers
To enable visibility rules for an Elementor widget or container, you can click on the widget to view its options. In the options area, go to the Voxel tab then click Visibility
The first thing you can choose is select a primary condition which can be
- Show this element if
- Hide this element if
Once you select a primary condition, you can edit rules and open the visibility rules UI
Visibility rules can also be enabled for individual list items within the same widget.
Pages and templates
Visibility rules can also be enabled for entire pages or templates.
To enable restrictions, you can edit the page or template with Elementor then click the settings icon on the bottom left part of the screen then go to Voxel tab then Visibility rules.
An additional option available when restricting templates or pages is selecting a restricted template that will be shown to the users who do not have permissions to access the page
Applying visibility rules
You can add and combine multiple conditions on the same group or create multiple groups for different conditions.
Conditions within the same group have And logic, while different rule groups have Or logic.
This means when Voxel evaluates visibility rules, it will go through the rule groups and check their conditions. If a condition within a rule group is not met, the entire rule group fails and evaluation moves on to the next rule group.
Apart from the preset conditions, Voxel allows you to use the values of individual dynamic tags as a restriction condition.
You can pick a specific dynamic tag
pick a condition you want to compare it against
- Is empty
- Is not empty
- Is equal to
- Is not equal to
- Is greater than
- Is less than
- Is checked
then type the value that it should match for the condition to be met