21st Mar '23
/
2 comments

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 BricksPopup Builder and Interactions features.

Step 1

Go to Bricks → Templates and create a template of the type Popup named say “Popup – Loop Item”.

Edit it.

Settings (gear icon) → TEMPLATE SETTINGS → CONDITIONS: Add “Entire website” condition.

You may want to set a height like 75vh for the popup.

Add a Container and inside that, your desired elements that should appear when a button or Read more link is clicked for each post in the loop.

Close icon settings:

Also, set its cursor to be pointer.

By default, the close icon placement will be near the top right of the browser viewport.

We need to set the actual popup’s position to be relative so that the close icon is at the top right of the popup instead.

Settings (gear icon) → PAGE SETTINGS → CUSTOM CODE → Custom CSS:

.brx-popup-content {
	position: relative;
}

Step 2

Edit an archive template or a static Page in which you want to show a list/grid of posts via query loop with Bricks.

Set up a query loop if you haven’t already. A sample copy-and-paste ready JSON can be found here.

Add a Template element inside the query loop element.

Select the popup template created in the previous step.

Select the Read more link/button and set the URL to #.

Add an interaction to show the popup.

That’s it! Check on the frontend. When the Read more buttons are clicked, the post-specific title and content should appear inside the popup.

Get access to all 610 Bricks code tutorials with BricksLabs Pro

2 comments

Leave a Reply to Dale Donnolly (Cancel Reply)

 

Related Tutorials..

Pro
Dynamic URL Parameter Post Popups in Bricks

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…
Categories:
Tags:
Pro
Dropdown Menu in Bricks using Interactions

Dropdown Menu in Bricks using Interactions

This Pro tutorial provides the steps to toggle a WordPress menu when a div is clicked using the Interactions feature in Bricks. When clicked: Step…
Categories:
Pro
Button-specific HTML in Bricks Popup

Button-specific HTML in Bricks Popup

In the Bricks Facebook group a user asks: I need to create popups to expend the text (eg. read more). I wonder if I have…
Categories:
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.
Categories:
Tags:
Pro
Viewport Entry Animation for all Sections Sitewide in Bricks

Viewport Entry Animation for all Sections Sitewide in Bricks

How to make viewport entry animations be automatically applied to either all sections of a page/template or sitewide across all pages.
Categories: