5th Sep '24
/
0 comments

Query String Value in Bricks

This Pro tutorial provides the steps to output the value of a specified query string, also known as URL parameter in Bricks.

We shall also show how elements can be conditionally rendered only if the query string in the URL of a given page has

  1. a value
  2. a specified value

The example considered in this tutorial is subid URL parameter.

Ex.:

example.com/?subid=newsletter

You should replace all instances of subid with your query variable as applicable.

Step 1

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Post ID Query Variable-based Post Output in Bricks

Post ID Query Variable-based Post Output in Bricks

How to query a single post of a custom post type using the post ID passed to a page via a URL parameter.