Query Variables Condition in Bricks

This Pro tutorial provides the steps to register a custom function that returns true or false depending on whether the current page URL has specific query parameters in Bricks.

For example only if the URL has fname, lname and email URL parameters like this:

https://bricks.local/query-variables-test/?fname=sri&lname=kat&[email protected]

should a Section be output.

Step 1

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get full access to all 220+ Bricks tutorials with BricksLabs Pro


  • Brian Lovelace

    Looking to do something similar, but only display a div if a post is ‘sticky’ — how can I modify this to work with what I’m trying to do?

Leave your comment