22nd May '22/1 commentConditional Section when Post has a Featured Image in BricksSridhar Katakam This Pro tutorial provides the steps to output a Section in Bricks on single posts (of any post type) only if the post has a featured image. Step 1 Create a Template of the type Section named say, "Featured Image Section" and edit it with Bricks. Add a Section and place your desired content like a Heading and Image inside the Section's Container. Select Featured Image to be shown and select a suitable image size. Step 2 Edit the Template that applies the single view of your post type or a specific Page with Bricks. Add a Code element where you would like to conditionally output your featured image section. 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 630 Bricks code tutorials with BricksLabs Pro
Pro Conditional CSS Classes based on Bricks Query CountIn a Bricks project I am currently working on, there are nested query loops - team members inside departments on a Page. Each team member…Read more →Categories: Bricks, ProTags: bricks/element/render_attributes
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
Pro Bricks Dynamic Condition – Check if today falls within 5 days before any holiday dateCreating a custom condition that returns true or false depending on whether today falls within 5 days before any holiday dates selected on a Meta…Read more →Categories: Bricks, ProTags: Meta Box
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 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
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
[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
Pro User Role Condition in BricksThis 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…Read more →Categories: Bricks, ProTags: Conditions
Pro Check if the User Purchased Any of the Specified ProductsThis Pro tutorial provides the steps for setting up a dynamic data condition on any element in Bricks so it can be output only if…Read more →Categories: Bricks, Plugins, ProTags: Conditions, Dynamic Data, WooCommerce