Dynamic URL Parameter Post Popups in Bricks

Bricks 1.9.4 added AJAX support for Popups via its Popup Builder.

popupContextId can be now set in bricksOpenPopup() which means a popup can be set to show dynamic data from any post with the specified ID.

This Pro tutorial provides the steps for setting up a dynamic Popup that opens on page load and shows data like Post Title and Post Excerpt pertaining to the post whose ID is passed in the id URL parameter.

Ex.: example.com/?id=103 will show a popup having featured image, post title, excerpt and a button linking to the permalink of the post whose ID is 103.

example.com/?id=106 will show a popup having featured image, post title, excerpt and a button linking to the permalink of the post whose ID is 106 and so on.

Step 1

Go to Bricks → Templates and import the following "Post Popup" template.

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 524 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Showing a Popup conditionally in Bricks based on Query Parameter

Showing a Popup conditionally in Bricks based on Query Parameter

Here's two ways a Bricks Popup can be shown on page load depending on URL parameter value.
Categories:
Tags:
How to show a specific post’s data in a Bricks Popup

How to show a specific post’s data in a Bricks Popup

This tutorial provides the steps to show a specific post's data like the title, featured image in a Bricks Popup. Step 1 Go to Bricks…
Categories:
Tags:
Pro
Post-specific Dynamic Info Popup in Bricks

Post-specific Dynamic Info Popup in Bricks

This Pro tutorial provides the steps to show post-specific data (post title and post content) in a popup using Bricks' Popup Builder and Interactions features.…
Categories: