This Pro tutorial shows how we can register a custom function that checks whether the current Page or Post (of any hierarchical post type) is a parent i.e., has at least 1 child.
This can then be used with a Dynamic data Bricks condition to conditionally output elements based on whether the current (either single or in a query loop) has children or not.
Sridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.
Get access to all 632 Bricks code tutorials with BricksLabs Pro
Related Tutorials..
Conditional Rendering for Logged in/out Users by CSS Classes in Bricks
This 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…
This Pro tutorial provides the steps to conditionally output elements depending on the currently logged-in user's role. Step 1 Create a section Template having the…