27th Jun '25/0 commentsHow to Query WordPress Taxonomy Terms by Hierarchy Level in BricksSridhar Katakam This Pro tutorial provides the steps to limit the terms of a Bricks Terms query to only those at a specific level within the taxonomy hierarchy. Consider this WooCommerce product categories hierarchy: After implementing the tutorial we can output all terms in level 1 or 2 or 3 etc. Terms in level 1 (note this is also possible w/o any custom code): Terms in level 2: Terms in level 3: 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 625 Bricks code tutorials with BricksLabs Pro
Load more for Query loops in BricksDid you know that Bricks has AJAX loading for query loop posts on-click out of the box?Read more →Categories: Bricks, FreeTags: Query Loop
Auto Responsive Grids in BricksThis tutorial provides the CSS that can be pasted for automatic responsive grids in Bricks Builder. Posts element Each post will get a right padding…Read more →Categories: Bricks, FreeTags: CSS, CSS Grid, Posts element, Query Loop
Pro Parent post Bricks query loopUpdated on 5 Feb 2024 In the BricksLabs Facebook group a user asks: Is there a way to output the data of a parent post…Read more →Categories: Bricks, ProTags: Query Loop
Pro Alternating Posts from Two Post Types in BricksHow to output posts from two seperate post types, alternating in a query loop.Read more →Categories: Bricks, ProTags: Query Loop
Latest Featured Posts First in Bricks Query Loop (No Duplicates)In the Bricks Facebook group a user asks: We can use AI to help unfreeze our brains sometimes or at least have it write the…Read more →Categories: Bricks, FreeTags: Query Loop
Pro Custom Nested Queries in BricksIn most of the previous tutorials covering nested query loops in Bricks on this site, we accessed the parent query's looping object in the inner…Read more →Categories: Bricks, ProTags: Nested Queries, Query Loop
Pro Events grouped by months within years based on event date custom field valueHow to output events grouped by years and months using three nested query loops in Bricks.Read more →Categories: Bricks, ProTags: Nested Queries
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 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