31st Jan '24/0 commentsAdding active class to the current term/post in a Bricks query loop on Term archives/single postsSridhar Katakam Updated on 29 Feb 2024 In the Sibling Terms Bricks Query Loop tutorial, a member asked: How can I set the class "active" to the current category ? This Pro tutorial shows how. This also applies to a posts query loop when viewing a single post, not just terms. 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: BricksProQuery LoopTerms 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 Post Data for the Current User in Bricks with Meta BoxHow to configure a query loop to output the post data of the SalesRep CPT associated with the current user.Read more →Categories: Bricks, Plugins, ProTags: Meta Box, Query Loop
Pro Nav Menus Custom Query Types in BricksUpdated on 21 Aug 2024 This Pro tutorial shows how custom query types for each navigation menu can be generated in Bricks. This enables us…Read more →Categories: Bricks, ProTags: Custom Query Type, Menu, Query Loop
Pro Building Prev / Next Posts with Query Loops in BricksFollowing on from our tutorial on Adding Custom WP_Query Loops in Bricks, in this pro tutorial we'll walk through the process of using those same…Read more →Categories: Bricks, ProTags: Adjacent posts, bricks/query/run, Query Loop, WP_Query
How to create filters with IsotopeJS in Bricks (Part 3): apply multiple filtersThis tutorial will review how to apply multiple filters to an isotope container using the IsotopeJS library‘s features in Bricks.Read more →Categories: Bricks, Free, PluginsTags: ACF, Animations, Isotope, Query Loop
How to populate a map with dynamic markers from a CPT using ACF in Bricks (PART 1)This tutorial provides the PHP & JS codes that can be pasted in order to create a dynamic map with markers populated from a custom…Read more →Categories: Bricks, Free, PluginsTags: ACF, Maps, Query Loop
Pro Nested Queries in Bricks – Posts Grouped by Published Years and CategoriesIn the past we showed how posts could be grouped by years in Bricks. This Pro tutorial takes it further by grouping posts by categories…Read more →Categories: Bricks, ProTags: Query Loop
Pro How to Insert Element(s) Between Query Loop Posts in BricksUpdate on 16 Aug 2023: Follow this tutorial instead. This Pro tutorial shows how we can insert a Div (or any custom HTML) after nth…Read more →Categories: Bricks, ProTags: Conditions, Dynamic Data, Query Loop
Pro [WooCommerce] Up-Sells and Cross-Sells Query Loop in BricksThis tutorial provides the steps to set up up-sells and cross-sells in the single product template.Read more →Categories: Bricks, Plugins, ProTags: bricks/posts/query_vars, JSON Code, Query Loop, WooCommerce
Pro ACF User Field Bricks PHP QueryIn the Bricks Facebook group a user asks: my end goal was to create a set of cards that would display the Users that are…Read more →Categories: Bricks, Plugins, ProTags: ACF, Users Query