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 633 Bricks code tutorials with BricksLabs Pro
Month-based Background Image in BricksHow to have different background images for an element for different quarters in a year.Read more →Categories: Bricks, FreeTags: Dynamic Data
[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 Conditional Output in Bricks based on if Content has HeadingsHow to prevent the output of the table of contents if the content has no headings.Read more →Categories: Bricks, ProTags:
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
Mapping Bricks Templates to WordPress TemplatesAs of Bricks 1.5 RC, it is not possible to specify that a Page use a particular Bricks template without editing that Bricks template and…Read more →Categories: Bricks, FreeTags: Dynamic Data, Templates, WordPress Page Template
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 Checking if the current Page/Post has Children i.e. is a Parent in BricksShows how we can check whether the current Page or Post (of any hierarchical post type) is a parentRead more →Categories: Bricks, ProTags: Conditions
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 Checking ‘PublishPress Future’ plugin’s Future Action enabled postsPublishPress Future is a handy plugin for scheduling actions like unpublishing or deleting posts (of any post type) at a specified date and time in…Read more →Categories: Bricks, Plugins, ProTags: PublishPress