11th Mar '26
/
0 comments

Post Published Year Range Slider in Bricks

This Pro tutorial provides the steps to set up a range slider for filtering posts by the year they were published in.

Bricks' 'Filter - Range' element has an option to specify a post meta key as the filtering criterion.

We can assign a custom _publication_year meta key to all posts and specify this in the range filter element.

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

Get access to all 626 Bricks code tutorials with BricksLabs Pro