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 633 Bricks code tutorials with BricksLabs Pro
Pro Remove Duplicate Term Names From Bricks Terms Query LoopExcluding terms with duplicate names, keeping the first occurrence & excluding subsequent terms with the same name.Read more →Categories: Bricks, ProTags: bricks/terms/query_vars, Terms Query
How to populate a dynamic nested slider from a frontend submission form using ACF PRO and BricksThis tutorial provides the builder settings, PHP & CSS codes that can be pasted in order to populate a dynamic nested slider from a custom…Read more →Categories: Bricks, Free, PluginsTags: ACF, Custom Post, Frontend Editing, Nested Slider, Query Loop
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: Load more, Query Loop
Pro Parent Query Loop Object – Traversing Nested Query Loops Up in BricksBricks enables us to build nested query levels of unlimited levels. Here are a couple of examples: Sometimes, you might want to obtain the parent…Read more →Categories: Bricks, ProTags: Nested Queries
Pro Mixed Post Types Grid in BricksHow to set up a mixed post types grid in Bricks, where you can display both standard posts and custom quote cards in alternating positions.Read more →Categories: Bricks, ProTags: Query Loop
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
Loop Item ID and Loop Item Object in BricksIf you are working on a Bricks site with specific requirements, chances are you need to grab the ID and/or object of the current item…Read more →Categories: Bricks, FreeTags: \Bricks\Query
How to apply a custom query var to multiple query loops in BricksIn this tutorial, we'll learn how to apply a PHP filter to modify the query var of multiple query loops in a single function Introduction…Read more →Categories: Bricks, FreeTags: Dynamic Data, Query Loop
Pro Adjacent Posts Bricks Query LoopThis Pro tutorial provides the steps to customize a posts query loop in Bricks to show previous and next posts on single post pages. The…Read more →Categories: Bricks, ProTags: Adjacent posts