Is there any custom code to load popup content with AJAX?


If you have a basic popup, whether it’s with AJAX or preloaded, it doesn’t matter.

However, if you have dynamic popups assigned to listing items or as product quick view, then loading content with AJAX is a must have. When you have like 20 listing items / Woo Products per page, it adds a lot of bloat to DOM elements and significantly increases load time.

Has anyone come up with a custom code to trigger Bricks Popups with AJAX?


1 Like

Frustrated with this problem!!

On one of the pages I have about 50 pop-ups, do not ask why and why you need it.
The page has just loaded, and all the content has already been received.
this is an example page:

My solution to the problem. Works, but I would like it to be in Bricks itself

jQuery Modal


<script src=""></script>
<link rel="stylesheet" href="" />

USE in Bricks


In the page template
I will not screenshot the conditions for the visibility of the buttons.

Each button has the same parameters, except for the link


Yes, the button is set.

Now you need to add a modal window and configure


Put something inside the div. This will be the content of Popup

Not really… you just need to use dynamic data in the popup… why would you think it would load 20 popups?


I guess you resussected this topic while I just opened a thread with same use case.

How to use dynamic content with in the popup?

The same way you add dynamic data to any bricks elements. You will likely have to do some custom code snippets that get post data from the button that was pressed so you can retrieve custom fields from whatever post the button is related to.

1 Like

So it is with custom code snippets! I’ll test it out!

Thank you @Wingtracer!

they just released some version of this in 1.9.4… havent tried it yet but plan to today. I am JS on the page to call admin ajax method, then update the popup with the response… chatGPT is your friend.