Categoría: BRICKS PRO TERMS QUERY
-
Checking if the current term in a Bricks Terms query loop of the given taxonomy has children
There could be situations when you need a way to check if the current term in a Bricks Terms query loop has children or not. This Pro tutorial shows how. Sample query loop: Step 1 Add the following in child theme‘s functions.php (w/o the opening PHP tag) or a code snippets plugin: <?php // Function…
-
aria-current=”true” for Current Categories on single Posts in Bricks
Updated on 11 Sep 2024 A user asks: I have a single post template and display all categories in it with the bricks loop. Now I would like to color all categories that are assigned to the post red. In the category template this is easy because the categories have aria-current=“page”, but how do I…
-

Term Parent Slug Data Attribute in Bricks
In the BricksLabs Facebook group, a user asks: How can I set a data attribute on a child taxonomy based on the parent tax? In this case, I want to change the background color of the {tax_name:link} element based on the parent taxonomy. This Pro tutorial shows how we can define a custom function that…