Restrict Content Pro in Bricks

This Pro tutorial provides the steps to restrict Pages and individual elements like Sections in Bricks depending on whether the current user has any active membership (free or paid) or any active paid membership or has access to a specific membership level when using Restrict Content Pro.

After implementing the tutorial, you can

  • assign a class of has-active-membership to an element for it to be output only to members that have at least one active membership - free or paid.
  • assign a class of has-paid-membership to an element for it to be output only to members that have at least one active membership for a paid membership level.

and use Dynamic data condition like

{echo:bl_has_rcp_membership_level(1)}

for an element to be output only if the current user has access to the specified membership level i.e., 1 in this example.

Content from the block editor is automatically protected by Restrict Content Pro.

If your Page Bricks template is set to also show Bricks content (as it should), note that out of the box it will be visible to everyone and not just to the members that should have access to it per what's set at the Page level via the "Restrict this content" meta box.

After adding the following code, you could simply add has-active-membership or has-paid-membership class to the Post Content element that's set to show Bricks content in your Page template at its STYLE → CSS → CSS classes to have the Bricks content be output only to members that have any active membership or any paid membership.

Step 1

This is a Pro members-only tutorial.

To get full access, login below or sign up for a Pro Account

Leave the first comment