Categoría: BRICKS DYNAMIC DATA FREE
-
Dynamic Data :value filter in Bricks
Bricks 1.5.7 introduced a new :value dynamic data filter. This tutorial provides a practical example of how this filter can be used. Meta Box Checkbox List When a Meta Box Checkbox List type of field has both values and labels for the choices like this: and let’s say a specific Page has the field populated…
-
Month-based Background Image in Bricks
If you are looking to have different background images of an element for different quarters in a year, here’s one way of doing it: Register a custom function that returns your desired quarter-specific image URL by adding this code in child theme‘s functions.php or a code snippets plugin: // Function to return a specific image…
-
Checking for Post Type in Bricks
Looking for a way to output elements conditionally based on the current post type in the loop in Bricks? Add a Dynamic data condition like this: {echo:get_post_type} Another example:
-
Conditionally Outputting Elements Only for Posts That Have a Specific Taxonomy Term
A user asked: I have a loop with some elements shown in a card.Some items have the taxonomy “Bestseller”.In the card I have a text with “Bestseller” that should be shown if taxonomy = “Bestseller”.How can I do that ? We can use the core WordPress has_term() function for checking if the current post has…
-
Dynamic Post ID in Query Loop
Updated on 6 Oct 2022 Looking for a unique ID for each post’s row in the output of Bricks’ Query Loop? Here’s how: Add an id attribute for the element on which query loop is enabled with the value being: post-{post_id} One of the use cases is that this enables you to link to these…