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 610 Bricks code tutorials with BricksLabs Pro
[Function] Current Term Has ChildrenUpdated on 20 Jul 2024 A user asks: I'm working on an archive template for WooCommerce products. I'm trying to hide a section if there…Read more →Categories: Bricks, FreeTags: Conditions, get_term_children
Checking if Repeater/Cloneable Meta Fields Are Empty in BricksCreating a condition to ensure that a section only gets output if at least one row of data is filled in.Read more →Categories: Bricks, Free, PluginsTags: Conditions
Pro Conditional Rendering of ACF Repeater Rows Based on True / False Sub Field in BricksThis Pro tutorial provides the steps to modify a ACF Repeater query loop to only output the rows for which a True / False type…Read more →Categories: Bricks, Plugins, ProTags: ACF Repeater
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
Conditional Output on the First Page of Archives in BricksHow to output an element on an archive page only if we're on the first page of the archive.Read more →Categories: Bricks, FreeTags: Conditions, get_query_var
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
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 User Role Conditional Output in BricksThis Pro tutorial provides the steps to output elements based on their CSS class to users of the specified role in WordPress when using Bricks…Read more →Categories: Bricks, ProTags: 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