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 612 Bricks code tutorials with BricksLabs Pro
Pro Conditional Output in Bricks based on Visitor SelectionHow we can dynamically show elements based on user selection.Read more →Categories: Bricks, ProTags: AJAX, Cookies, Fetch API, localStorage
How to conditionally load your scripts based on an ACF fieldThis tutorial provides the PHP codes that can be pasted in order to enqueue your scripts conditionally based on the value of an ACF field…Read more →Categories: Bricks, Free, PluginsTags: ACF, 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 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
Check if a given category has at least one postThere could be situations where you want to check if a given category (by its slug) has at least 1 post assigned to that category.…Read more →Categories: Bricks, FreeTags: Conditions
Pro Bricks Dynamic Condition – Check if today falls within 5 days before any holiday dateCreating a custom condition that returns true or false depending on whether today falls within 5 days before any holiday dates selected on a Meta…Read more →Categories: Bricks, ProTags: Meta Box
Pro Primary Term Name and Link in Bricks when using Rank MathOne of the features of the Rank Math SEO plugin is the ability to mark a term like category or product category as primary. See…Read more →Categories: Bricks, Plugins, ProTags: Dynamic Data, Rank Math
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
Pro Conditionally Rendering an Element Outside the Loop based on Taxonomy Term in BricksA user asks: Hiding element based on taxonomy I have an element in a footer that I want to hide if a page has a…Read more →Categories: Bricks, ProTags: Dynamic Data