19th Mar '23/2 commentsCondition 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 610 Bricks code tutorials with BricksLabs Pro
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 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
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
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
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 Query Variables Condition in BricksThis Pro tutorial provides the steps to register a custom function that returns true or false depending on whether the current page URL has specific…Read more →Categories: Bricks, ProTags: Conditions, Query Variables
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 Count of Images in Meta Box Image Advanced FieldIn the BricksLabs Facebook group a user asks: Is there a way to count images inside a post that uses metabox image upload ? This…Read more →Categories: Bricks, Plugins, ProTags: Dynamic Data, Image Advanced, Meta Box
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