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 634 Bricks code tutorials with BricksLabs Pro
Pro YouTube Video Timestamps in BricksThis Pro tutorial provides the steps to output a YouTube video given its ID with custom timestamps and their description text using ACF Pro or…Read more →Categories: Bricks, Plugins, ProTags: ACF Pro, ACF Repeater, Interactions, Loop Index, Meta Box
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 Posts older than today in BricksHow to display only posts that were published before today in a query loop.Read more →Categories: Bricks, ProTags: date_query
Pro Dynamic Posts Lightbox in Bricks using GLightboxSteps to set create a dynamic lightbox with content from the post inside of the query loop.Read more →Categories: Bricks, ProTags: Lightbox, 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 Category and Search Filtering for Nested Bricks Query LoopsHow to add a category dropdown and search input field so visitors can filter posts grouped by categories..Read more →Categories: Bricks, JavaScript, ProTags: Frontend Filters, Nested Queries
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
Querying Posts by Date Field to Exclude Past Events with ACPT PluginIn the Bricks' Facebook group, a user asked: Meta query? What am I missing?Hi all, really need a little guidance on this one. I have…Read more →Categories: Bricks, Free, PluginsTags: ACPT, Query Loop
Pro Dynamic Horizontal Posts Accordion in BricksCreating a horizontal accordion of featured images from posts output by Bricks' query loop.Read more →Categories: Bricks, ProTags: Accordion, CSS