Prefiltering Posts for customizing Query in Bricks


Updated on 29 Oct 2022

Bricks has an excellent filter called bricks/posts/query_vars for modifying the query of Posts and Product elements to modify the query with dynamic values and options not available in the editor.

In this Pro tutorial, we share a few practical examples of using this filter to filter the posts' output to

while ensuring that the correct instance of the Posts element is targeted.

Posts published in the specified year

Add a Posts element.

Then add the following in child theme's functions.php or a code snippets plugin like WPCodeBox:

This is a Pro members-only tutorial.

To get full access, login below or sign up for a Pro Account

Leave the first comment