#Overview
WP Fusion includes an integration with the Bricks visual site builder to let you control visibility of page elements based on a user’s tags or lists in your CRM or marketing automation platform.
#Access Control
To set up access rules on Bricks elements, open the settings for any widget, and click on the WP Fusion control group at the bottom of the Content tab.
The Visibility dropdown sets the default visibility for the widget. The options are:
- Everyone: The widget will be visible to everyone regardless of whether they’re logged in or not (this is the default)
- Logged in users: The widget will only be visible to logged in users
- Logged out users: The widget will only be visible to guests on your site
- Users who can access the post: Visibility will be determined based on the access rules configured on the underlying post (see below)
- Users who cannot access post: Users who cannot access the post, based on the access rules configured on the post
Depending on the visibility mode you’ve selected, there will be additional options
- Required Tags (any): The element will only be shown if the user is logged in and has at least one of the specified tags
- Required Tags (all): The element will only be shown if the user is logged in and has all of the specified tags
- Required Tags (not): If the Visibility mode is set to Everyone, the element will be shown to guests, and hidden from logged in users if they have any of the specified tags. If the visibility mode is set to Logged In Users, the element will be hidden from guests, and hidden from logged in users if they have any of the specified tags
#Visibility indicator
When editing content with Bricks, widgets that are protected by WP Fusion access rules will be displayed with an orange dotted line.
Note that the visibility indicator style is applied when the editor is loaded, so after making changes to an element’s visibility you will need to save and reload the editor to see the indicator.
#Inheriting access rules from posts
Bricks includes a powerful template builder that allows you to create templates for specific post types, grids, and archives.
WP Fusion supports the template builder by allowing you to set the visibility of an element based on the rules configured in the WP Fusion meta box on the underlying post.
To use this feature, select any element, and set the WP Fusion Visibility dropdown to either Users who can access the post or Users who cannot access the post.
In this example, we’ve built a course grid where the buttons are shown dynamically based on the user’s tags in your CRM, and the access rules configured on the underlying course.
The Take This Course button is set to Users who can access the post, the Upgrade to unlock button is set to Users who cannot access the post.
When the course grid is displayed, the buttons are shown dynamically based on the current user’s tags and the access rules configured on each course.
#Filter Queries
WP Fusion adds an option to the Posts widgets which allows you to filter the displayed results using WP Fusion’s access rules.
To turn this on enable the setting for Filter Queries in the WP Fusion control group (beneath the access settings).
With this setting on, any posts the user doesn’t have access to will be removed from the results.
You can use this to create personalized post listings, for example of courses or media items.
This is the same as enabling Filter Queries in the main WP Fusion settings, but it applies only to a single posts list at a time (which is better for performance).