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
Conditionally Outputting Elements only for Posts that have a Specific Taxonomy TermUsing the core WordPress has_term() function for checking if the current post has a specific term of a given taxonomy.Read more →Categories: Bricks, FreeTags: Dynamic Data
Conditionally Hide a Section on a Specific Taxonomy’s Term Archives in BricksA user asked: I have a CTA in the footer of my site, which I have custom fields on various templates, etc to populate. I…Read more →Categories: Bricks, FreeTags: Conditions
Pro Getting Field Values from a Connected CPT when using Meta Box Relationship in BricksConditionally render elements in a single template of a CPT depending on the value of a regular custom field.Read more →Categories: Bricks, Plugins, ProTags: Conditions, Custom Functions, Meta Box
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
JetEngine Checkbox Condition in BricksHow elements in Bricks can be conditionally output depending on the selected option from a JetEngine checkbox field.Read more →Categories: Bricks, Free, PluginsTags: JetEngine
Checking for Post Type in BricksA way to output elements conditionally based on the current post type in the loop in Bricks.Read more →Categories: Bricks, FreeTags: Dynamic Data
Pro Conditional single post Bricks template based on internal referrer URLHow to automatically select a single post template depending on the page from which the post is accessed.Read more →Categories: Bricks, ProTags: bricks/active_templates
Weekday Condition in BricksAs of Bricks 1.7, the built-in "Weekday" condition does not work correctly. This is most likely due to it not taking the site's timezone (set…Read more →Categories: Bricks, FreeTags: 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