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 630 Bricks code tutorials with BricksLabs Pro
Pro “My Favorites” in BricksThis Pro tutorial provides the steps to set up and use My Favorites in Bricks Builder.Read more →Categories: Bricks, Plugins, ProTags: Query Loop
Pro Alternating Posts from Two Post Types in BricksHow to output posts from two seperate post types, alternating in a query loop.Read more →Categories: Bricks, ProTags: Query Loop
Pro Displaying Gallery of SureCart Product Images with Bricks’ Query LoopCustom query loop for looping through SureCart product images.Read more →Categories: Bricks, Plugins, ProTags: SureCart
Pro Post Specific Footers in Bricks using Meta BoxThis Pro tutorial provides the steps to output post-specific footer using Meta Box' Post type of field when using Bricks. Sample screenshots below. Course CPT…Read more →Categories: Bricks, Plugins, ProTags: bricks/posts/query_vars, bricks/query/run, bricks/setup/control_options, Filters, Meta Box, Nested Queries
Pro Query Loop in BricksThis Pro tutorial walks you through the steps to use the Query Loop feature in Bricks to display a responsive grid of posts using CSS…Read more →Categories: Bricks, ProTags: 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 Posts Grouped by Post Dates in BricksSetting up query loops for “Post Dates” with an the inner loop displaying all posts published on that day.Read more →Categories: Bricks, ProTags: Nested Queries
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
Displaying SureCart Featured Products & Products Collections with a Query LoopWe walk through how to use a query loop to display SureCart products, featured products & collections.Read more →Categories: Bricks, Free, PluginsTags: Query Loop, SureCart