Bricks Builder is a popular visual site builder for WordPress, allowing users to design entire websites with a drag-and-drop interface and full customization capabilities.
While Bricks Builder does not have a native integration with the core Paid Memberships Pro plugin, you can still restrict content within Bricks Builder using Paid Memberships Pro. With this approach, you will be able to control visibility at the section or container level.
Use Paid Memberships Pro Shortcodes in Bricks Builder
Some PMPro shortcodes may not automatically render in Bricks due to their reliance on specific preheaders and template files. To ensure these shortcodes function properly, follow the steps and add the code recipe below. This will register essential PMPro shortcodes, enabling them to work within Bricks Builder.
- Navigate to your PMPro Pages > Edit with Bricks
- Click on Elements > add the PMPro Shortcode element.
- Publish your page.
- Add the following code recipe.
The Code Recipe
Customizing the Code Recipe
You can modify this recipe to support other PMPro shortcodes, including those from our Add Ons. For example, to make the `[pmpro_advanced_levels]` shortcode from the PMPro Advanced Levels Page Add On work in Bricks Builder, follow these steps:
- Ensure the Advanced Levels Page Add On is installed and activated so the required functions are available.
- Add the shortcode to the array in the existing code on line 26:
‘pmpro_advanced_levels’ => ‘advanced-levels’ - Use the Bricks “Shortcode” Element to insert [pmpro_advanced_levels] into your Bricks pages.
Restrict Content in Single Pages or Posts
This Bricks Builder integration also supports conditions at the single page or post level with some custom code.
- Navigate to the page or post that you would like to edit.
- Click Edit with Bricks.
How to Set Membership Conditions For an Element
Once you are within the Brick Builder, select the element that you want to restrict based on membership requirements.
Navigate to Style > CSS Classes > Type in your “Class Name“.
The Code Recipe
Add the following code recipe to your site to conditionally display Bricks Builder elements to membership levels based on element class:
Customizing the Code Recipe
Update line 26 with the membership level ID numbers that should have access. You can locate the membership level ID’s by navigating to Memberships > Settings > Levels. The IDs are displayed in the first column.
Update line 29 with your custom “class name”. It is recommended to use class names similar to our example in the code recipe so you can easily understand what the class does.
Last updated on April 9, 2025