19th Mar '23/2 comments/FavoriteCondition to Check if the Current Category Has At Least One ChildSridhar Katakam Looking to render an element in the category archive Bricks template only if the category of the current category archive page is a parent? This Pro tutorial shows how. Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin: This is a BricksLabs Pro tutorial. For full access login below or create your BricksLabs Pro account Username Password Remember Me Forgot Password Tagged: BricksDynamic DataProWordPressSridhar KatakamSridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.Get access to all 526 Bricks code tutorials with BricksLabs Pro
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
ACF Gallery Images Count Dynamic Condition in BricksConditionally output elements based on how many images are present in the current post’s ACF Gallery field.Read more →Categories: Bricks, FreeTags: ACF Gallery, ACF Pro, Dynamic Data
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 Month and Day Condition in BricksThis Pro tutorial shows how we can define a custom function that takes in a month in the three-letter format (like Dec) and a day…Read more →Categories: Bricks, ProTags: Conditions, Dynamic Data
Is WooCommerce Cart Empty Condition in BricksLooking to conditionally render an element depending on whether the user's cart is empty or not when using WooCommerce? and use it with a Dynamic…Read more →Categories: Bricks, Free, Plugins, WordPressTags: Conditions, WooCommerce
How to add a “Sold Out” badge for out of stock products in BricksLooking to add a "Sold Out" badge for products in the Shop page for WooCommerce products that are out of stock when using Bricks' Products…Read more →Categories: Bricks, Free, PluginsTags: Dynamic Data, WooCommerce
Pro How to Insert Element(s) Between Query Loop Posts in BricksUpdate on 16 Aug 2023: Follow this tutorial instead. This Pro tutorial shows how we can insert a Div (or any custom HTML) after nth…Read more →Categories: Bricks, ProTags: Conditions, Dynamic Data, Query Loop
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
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