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 633 Bricks code tutorials with BricksLabs Pro
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 At Least 1 Search Result Condition in BricksRegistering a custom condition to render elements depending on whether there is at least one search result.Read more →Categories: Bricks, ProTags: Conditions, Search Results
Pro Conditionally outputting an element in a Query Loop based on date-type custom fieldThis Pro tutorial shows how to output an element in a Bricks' query loop only if the value of a date-type of custom field for…Read more →Categories: Bricks, Plugins, ProTags: Conditions, Meta Box
Pro Condition for checking Bricks contentOnly outputting Bricks content when a Page is built with Bricks, otherwise display WP content.Read more →Categories: Bricks, ProTags: Setup, Templating
Pro Conditional Rendering in Bricks Based on CSS ClassUpdated on 19 Jun 2024 A user asks: Is there a way to apply the same conditions to several elements like we set styles appending…Read more →Categories: Bricks, ProTags: bricks/element/render
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
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 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
Pro Conditional Output in Bricks based on Visitor SelectionHow we can dynamically show elements based on user selection.Read more →Categories: Bricks, ProTags: AJAX, Cookies, Fetch API, localStorage