21st Aug '24
/
0 comments

Showing a Popup conditionally in Bricks based on Query Parameter

This Pro tutorial provides information on two ways a Bricks Popup can be shown on page load depending on whether the URL has a specific URL parameter with a specific value.

Ex.:

Show the popup only if the page URL is

https://example.com/sample-page/?etsTicketWidget=basket-detail

After implementing the tutorial, the popup will not appear if the query string is not present when accessing this page or when the value of etsTicketWidget is something other than basket-detail.

Step 1

Create a Bricks template of the type Popup and add your desired elements inside.

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 612 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
ACF Repeater sub field value dynamic data condition in Bricks

ACF Repeater sub field value dynamic data condition in Bricks

This Pro tutorial provides the steps to output an element on single posts (can be of any post type) only if a specified ACF (Pro)…
Post-specific Dynamic Info Popup in Bricks

Post-specific Dynamic Info Popup in Bricks

This tutorial provides the steps to show post-specific data (post title and post content) in a popup using Bricks' Popup Builder and Interactions features. Step…
Categories:
Create A Customizable AJAX Add To Cart Button In Bricks Builder

Create A Customizable AJAX Add To Cart Button In Bricks Builder

In Bricks, you can simply create an Add To Cart button from a dynamic data / function {woo_add_to_cart}. This button supports AJAX as well if…
Pro
Bricks Dynamic Condition – Check if today falls within 5 days before any holiday date

Bricks Dynamic Condition – Check if today falls within 5 days before any holiday date

Creating a custom condition that returns true or false depending on whether today falls within 5 days before any holiday dates selected on a Meta…
Categories:
Tags: