31st Jan '24/0 comments/FavoriteAdding 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 525 Bricks code tutorials with BricksLabs Pro
Querying Posts by JetEngine Switcher Field in BricksWe look at how to display only posts with switcher value of ‘1’ in a specific query loop.Read more →Categories: Bricks, Free, PluginsTags: JetEngine, Query Loop
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 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
Dynamic Post ID in Query LoopHow to add unique IDs for each post in Bricks’ Query Loop.Read more →Categories: Bricks, FreeTags: Dynamic Data
How to populate a map with dynamic markers from a CPT using ACF in Bricks (PART 2)This tutorial provides the PHP & JS codes that can be pasted in order to create a flying effect on map markers each time your…Read more →Categories: Bricks, Free, PluginsTags: ACF, Animations, Maps, Query Loop
Pro Upcoming Events Grouped by ‘Month Year’ in BricksA custom query loop type for showing future events based on a date custom field using three nested query loops.Read more →Categories: Bricks, ProTags: ACF, Custom Query Type, 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 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 Meta Box Cloneable Field Query Loop in BricksThis Pro tutorial provides the steps to create a custom query type for outputting the values of one or more instances/items/rows of a cloneable custom…Read more →Categories: Bricks, Plugins, ProTags: Custom Query Type, Meta Box, Query Loop