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 Upcoming Events Grouped by ‘Month Year’ in BricksA custom query loop type for showing future events based on a date custom field using three nested query loops.Read more →Categories: Bricks, ProTags: ACF, Custom Query Type, Query Loop
Pro Google Calendar Query Loop in BricksUsing a query loop to pull events from a public Google Calendar and output names, dates & times and descriptions.Read more →Categories: Bricks, ProTags: Custom Query Type, Google Calendar, Query Loop
Pro Masonry for Query Loop in BricksIf you are looking to implement masonry with a 'view more' button i.e., click-type of infinite scroll follow this tutorial instead. Updated on 15 Mar…Read more →Categories: Bricks, ProTags: Masonry, Query Loop
Filtering Bricks Posts Query Loop by Meta Box Group’s Radio Subfield ValueIn the past we showed how a Bricks posts query loop can be filtered by Meta Box group's subfield of types text/number and Datepicker here.…Read more →Categories: Bricks, PluginsTags: Meta Box, Query Loop
Pro Upcoming Events in Bricks Grouped by ‘Month Year’ with Frontend Filtering by Event TypeUpdated version of the earlier Upcoming Events Grouped by ‘Month Year’ in Bricks tutorial with some improvements:Read more →Categories: Bricks, JavaScript, Plugins, ProTags: Nested Queries, Query Loop
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 Excluding Duplicate Posts from Query Loops in BricksHow to ensure that posts are not duplicated when two query loops are used on the same page.Read more →Categories: Bricks, ProTags: Query Loop
Pro Custom SQL Ordering for Sorting Events in BricksShowing events ordered by the event date with upcoming events in ascending order and past events in descending order.Read more →Categories: Bricks, ProTags: Ordering, Sorting, SQL
Pro Related Posts by Taxonomy in BricksIn the previous Posts Related by Current Post's Terms in Bricks tutorial, we showed how posts related to the current single post that have the…Read more →Categories: Bricks, ProTags: Query Loop, Related Posts