7th Jun '24/0 commentsChecking if the current term in a Bricks Terms query loop of the given taxonomy has childrenSridhar Katakam There could be situations when you need a way to check if the current term in a Bricks Terms query loop has children or not. This Pro tutorial shows how. Sample query loop: Step 1 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: BricksProTerms QuerySridhar 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 How to Query WordPress Taxonomy Terms by Hierarchy Level in BricksHow to limit the terms of a Bricks Terms query to only those at a specific level within the taxonomy hierarchy.Read more →Categories: Bricks, ProTags: Terms Query
Pro Adding active class to the current term/post in a Bricks query loop on Term archives/single postsUpdated on 29 Feb 2024 In the Sibling Terms Bricks Query Loop tutorial, a member asked: How can I set the class "active" to the…Read more →Categories: Bricks, ProTags: Query Loop, Terms Query
Pro Bricks Term Query Sorted by Tag Count of Posts in the Current CategoryHow we can display the most used tags for posts within the current category.Read more →Categories: Bricks, ProTags: bricks/terms/query_vars, Terms Query
Pro Remove Duplicate Term Names From Bricks Terms Query LoopExcluding terms with duplicate names, keeping the first occurrence & excluding subsequent terms with the same name.Read more →Categories: Bricks, ProTags: bricks/terms/query_vars, Terms Query
Pro aria-current=”true” for Current Categories on single Posts in BricksHow to separately style only the category links that are assigned to the current post.Read more →Categories: Bricks, ProTags: Terms Query
Pro Category Grid with ACF Images in BricksCreating a grid of post categories, each category card showing an image from an ACF field, category name & description.Read more →Categories: Bricks, Plugins, ProTags: ACF, Terms Query
Pro Term Parent Slug Data Attribute in BricksHow we can set a data attributes on a child taxonomy dynamically based on the parent taxonomy.Read more →Categories: Bricks, ProTags: Terms Query
Pro Terms Query in Bricks Filtered by Post MetaConsider this scenario: CPT: jobTaxonomy: industryCustom field: job_visibility of type Radio with a default value of public. The other value is private. Requirement: Show the…Read more →Categories: Bricks, ProTags: bricks/terms/query_vars, Terms Query
Pro Current Post’s Terms in BricksUpdated on 15 Jan 2024 This Pro tutorial provides the steps to set up a grid of terms (like categories) that the current post is…Read more →Categories: Bricks, ProTags: JSON Code, Query Loop, Terms Query