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 Checking if the current term in a Bricks Terms query loop of the given taxonomy has childrenThere could be situations when you need a way to check if the current term in a Bricks Terms query loop has children or not.…Read more →Categories: Bricks, ProTags: Terms Query
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
Auto Responsive Grids in BricksThis tutorial provides the CSS that can be pasted for automatic responsive grids in Bricks Builder. Posts element Each post will get a right padding…Read more →Categories: Bricks, FreeTags: CSS, CSS Grid, Posts element, Query Loop
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 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
Pro Hierarchical Posts with Nested Query Loops in BricksLearn how to set up nested query loops in Bricks to show hierarchical posts with child posts grouped under their corresponding parent postsRead more →Categories: Bricks, ProTags: Nested Queries
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
How to create a dynamic infinite logo slider with ACF and BricksThis tutorial provides the builder settings, PHP & CSS codes that can be pasted in order to create an infinite logo slider in pure CSS…Read more →Categories: Bricks, FreeTags: ACF, CSS, CSS Grid, Custom Post, 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