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 633 Bricks code tutorials with BricksLabs Pro
Pro Related Episodes Grouped by Episode Chapters on Single Podcasts in Bricks when using JetEngineA user asks: How to Display Related Episodes Grouped by Chapters on a Podcast Page in Bricks? Hi everyone, I have two post types created…Read more →Categories: Bricks, Plugins, ProTags: JetEngine, Relationship
Pro 6 Random Featured Posts in Alphabetical Order in BricksHow to output x number of random posts with a specific meta value set, in Alphabetical order.Read more →Categories: Bricks, ProTags: Query Loop
Pro Ordering Posts by Terms in BricksHow to output upcoming events at the top and past events below in a single query loop in Bricks.Read more →Categories: Bricks, ProTags: Query Loop
Pro Filtering posts by a group field’s subfield value with Meta Box when using a custom table in BricksFiltering a query loop to output only those posts with the value of a Select subfield of a Group field set to Yes when using…Read more →Categories: Bricks, Plugins, ProTags: Meta Box
Pro Category Posts Accordion in BricksThis Pro tutorial provides the steps to set up a dynamic accordion of posts grouped by their categories based on the previous Posts Grouped by…Read more →Categories: Bricks, ProTags: Accordion, bricks/posts/query_vars, Nested Queries
Related Posts by Author in BricksQuerying posts on single posts by the author of the current post.Read more →Categories: Bricks, FreeTags: Query Loop
How to create filters with IsotopeJS in Bricks (Part 4): AJAX filter and infinite loops, Sorting, List view and Disable animationsThis tutorial will explain how to enable the AJAX filter with an infinite scroll query loop container, how to add a sorting function, how to…Read more →Categories: Bricks, FreeTags: Filters, Isotope, Query Loop
How to List Your Posts Divided by Categories in BricksIn this tutorial, we'll learn how to display a list of posts divided by each category. The DOM tree Here is how I structured my…Read more →Categories: Bricks, FreeTags: Dynamic Data, Query Loop
Pro Conditionally Outputting Query Loop Item Based on Post Meta in BricksRendering query-loop enabled posts depending on the value of each post's custom field value is tricky because by default, the custom field plugins' functions or…Read more →Categories: Bricks, ProTags: bricks/element/render