5th Jun '22/0 commentsUser Role Condition in BricksSridhar Katakam This Pro tutorial provides the steps to conditionally output elements depending on the currently logged-in user's role. Step 1 Create a section Template having the content you wish to output for users having a specific role. Sample name of a Template for author user role: Author User Role Content Edit and build it with Bricks. Step 2 Add the following in your child theme's functions.php: This is a BricksLabs Pro tutorial. For full access login below or create your BricksLabs Pro account Username Password Remember Me Forgot Password Tagged: BricksConditionsProSridhar KatakamSridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.Get access to all 633 Bricks code tutorials with BricksLabs Pro
Pro ACF Options Page Custom Field Conditional in BricksThis Pro tutorial shows how we can set an element in Bricks to be output only if the value of a specific custom field on…Read more →Categories: Bricks, Plugins, ProTags: ACF Pro, Conditions, Options page
Checking for ACF Repeater Rows in BricksUpdated on 13 Feb 2025 Bricks enables us to conditionally output elements if a ACF field of basic type like Text has value by selecting…Read more →Categories: Bricks, Free, PluginsTags: ACF, ACF Repeater, Conditions, Dynamic Data
Pro Day of Week Condition in BricksDisplaying elements conditionally based on the current day of the week.Read more →Categories: Bricks, ProTags: Conditions
Pro Conditional CSS in Bricks based on Post MetaIn the Bricks Facebook group a user asked: Hi, how do you normally control margin, padding and font-size using dynamic data? I'm looking for the…Read more →Categories: Bricks, Plugins, ProTags: Attributes, wp_add_inline_style
Pro MemberPress in BricksThis tutorial aims to be a useful resource for using MemberPress in Bricks sites.Read more →Categories: Bricks, Plugins, ProTags: Conditions, Filters, MemberPress
Pro How to Add Custom, Conditional Skip Links in BricksHow we can customise the skip links for different templates, so they better match the content on the page.Read more →Categories: Bricks, ProTags: Accessibility, Conditions, Skip Links
Is WooCommerce Cart Empty Condition in BricksUpdated on 5 Nov 2024 Looking to conditionally render an element depending on whether the user's cart is empty or not when using WooCommerce? Add…Read more →Categories: Bricks, Free, Plugins, WordPressTags: Conditions, WooCommerce
Conditional Rendering for Logged in/out Users by CSS Classes in BricksThis tutorial shows how Bricks builder's bricks/element/render filter can be used to conditionally output elements having a class of logged-in to logged-in users only and…Read more →Categories: Bricks, FreeTags: Conditions
Pro Conditional Rendering Based On Meta Box Group’s Sub FieldThis Pro tutorial shows how we can output an element on a single post pages only if a specified sub-field (custom field created using Meta…Read more →Categories: Bricks, Plugins, ProTags: bricks/element/render, Conditions