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
Conditional Output based on Manual Excerpt in BricksHow to display a post’s excerpt only if it has been manually set.Read more →Categories: Bricks, FreeTags: Conditions
Pro Meta Box Settings Page Custom Field Conditional in BricksThis is the equivalent of ACF Options Page Custom Field Conditional in Bricks tutorial for Meta Box. Refer to the previous Meta Box Settings Fields…Read more →Categories: Bricks, Plugins, ProTags: bricks/element/render, Conditions, Meta Box
Pro ACF Repeater sub field value dynamic data condition in BricksThis Pro tutorial provides the steps to output an element on single posts (can be of any post type) only if a specified ACF (Pro)…Read more →Categories: Bricks, Plugins, ProTags: ACF Pro, Conditions, Dynamic Data
Check if a given category has at least one postThere could be situations where you want to check if a given category (by its slug) has at least 1 post assigned to that category.…Read more →Categories: Bricks, FreeTags: Conditions
Pro Conditional Related Posts in BricksHow to output a section only if there is at least 1 related post for the current post being viewed.Read more →Categories: Bricks, ProTags: Conditions, Related Posts
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 Seasonal banner display in BricksThis Pro tutorial shows how a banner Section can be conditionally output only during/between the start and end dates set in ACF Options page in…Read more →Categories: Bricks, Plugins, ProTags: bricks/element/render, Conditions
Pro Condition to Check if the Current Category Has At Least One ChildLooking to render an element in the category archive Bricks template only if the category of the current category archive page is a parent? This…Read more →Categories: Bricks, Pro, WordPressTags: Dynamic Data
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