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 How to Insert Element(s) Between Query Loop Posts in BricksUpdate on 16 Aug 2023: Follow this tutorial instead. This Pro tutorial shows how we can insert a Div (or any custom HTML) after nth…Read more →Categories: Bricks, ProTags: Conditions, Dynamic Data, Query Loop
Condition for Checking Current Post Category in BricksHow we conditionally display an element based on the current post's categories.Read more →Categories: Bricks, FreeTags: Conditions
Pro Query Variables Condition in BricksThis Pro tutorial provides the steps to register a custom function that returns true or false depending on whether the current page URL has specific…Read more →Categories: Bricks, ProTags: Conditions, Query Variables
Create A Customizable AJAX Add To Cart Button In Bricks BuilderIn Bricks, you can simply create an Add To Cart button from a dynamic data / function {woo_add_to_cart}. This button supports AJAX as well if…Read more →Categories: Bricks, Free, PluginsTags: AJAX, Conditions, WooCommerce
Pro Checking ‘PublishPress Future’ plugin’s Future Action enabled postsPublishPress Future is a handy plugin for scheduling actions like unpublishing or deleting posts (of any post type) at a specified date and time in…Read more →Categories: Bricks, Plugins, ProTags: PublishPress
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
Conditions in Bricks BuilderThe current version of Bricks does not have a built-in Conditions feature but that does not mean we can't set them up manually with custom…Read more →Categories: Bricks, FreeTags: Conditions
Pro Day of Week Condition in BricksDisplaying elements conditionally based on the current day of the week.Read more →Categories: Bricks, ProTags: Conditions
Conditionally Outputting Based on Query Count in BricksUpdate on 22 Sep 2023: There's a much simpler built-in method now. See this post. In the Bricks Facebook group a user asks: Is there…Read more →Categories: Bricks, FreeTags: Conditions, WP_Query