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
Conditionally Outputting Elements only for Posts that have a Specific Taxonomy TermUsing the core WordPress has_term() function for checking if the current post has a specific term of a given taxonomy.Read more →Categories: Bricks, FreeTags: Dynamic Data
Pro ACF Group Sub Field Values from Matching Post TermIn Bricks Reddit, a user asks: Let's break this down and set up the scenario practically. First, there's a Language taxonomy for posts (could be…Read more →Categories: Bricks, Plugins, ProTags: ACF, Dynamic Data
Pro City-based and Country-based Conditional Output in BricksThis Pro tutorial provides the steps to render a Bricks element only if the visitor is from the specified country or city. Note: Caching may…Read more →Categories: Bricks, ProTags: Geotargeting
Pro “Pro” Category Ribbon for Posts in BricksThis Pro tutorial provides the steps to show a "Pro" ribbon for posts that are categorized under the "Pro" category when using Bricks builder. Step…Read more →Categories: Bricks, ProTags: Dynamic Data
Conditions in Bricks BuilderThe current version of Bricks does not have a built-in Conditions feature but that does not mean we can't set them up manually with custom…Read more →Categories: Bricks, FreeTags: Conditions
JetEngine Checkbox Condition in BricksHow elements in Bricks can be conditionally output depending on the selected option from a JetEngine checkbox field.Read more →Categories: Bricks, Free, PluginsTags: JetEngine
Pro Conditional single post Bricks template based on internal referrer URLHow to automatically select a single post template depending on the page from which the post is accessed.Read more →Categories: Bricks, ProTags: bricks/active_templates
Pro Check If The Latest Post Was Published in The Last X MinutesIn this Pro tutorial we shall define a custom function that takes in the number of minutes as an argument and returns true if there…Read 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