AJAX Popup Builder
Load the content of a native Bricks popup on demand using BricksUltimate AJAX controls. This is an enhancement to supported trigger elements, not a separate popup element. It is useful for public product quick views, post previews, and term-specific popups.
Setup and First Use
- Create and publish a Bricks popup template. Set its template conditions so the intended page can open it.
- For record-specific content, add a posts or terms query in the popup and build one record layout inside it. Start with one item.
- On the source page, add a supported trigger such as a Button, Div, SVG, Heading, Image, or supported add-to-cart element.
- Add the native Bricks interaction that opens your popup.
- On the same trigger, find Style → Ajax Popup, enable Enable the AJAX action, and choose Post Query, Term Query, or Static content.
- Set Fetching Post ID or Fetching Term ID as required. Inside a listing, use the current record ID dynamic tag rather than a hard-coded ID.
- Optionally set Loading Icon(gif) to an accessible image URL. Save and test multiple records on the frontend.
Controls and Settings
| Control | Purpose and usage |
|---|---|
| Enable the AJAX action | Adds BU loading behavior to the trigger. A native popup interaction still identifies which popup to open. |
| Query Loop Builder Type | Post Query filters popup post queries, Term Query filters term queries, and Static content is for a non-record-specific layout. |
| Fetching Post ID / Fetching Term ID | Supplies the requested record. A post ID and a term ID are not interchangeable. |
| Loading Icon(gif) | Accepts an animated GIF URL for loading feedback. Keep it small and ensure the URL is available over the same secure environment. |
Keep the Popup Query Focused
The request applies its post or term filtering while rendering the popup. Start with one relevant loop and avoid unrelated nested queries that could also receive that filter. Confirm the image, title, price, and any dynamic fields refer to the clicked record rather than the popup preview record.
Public Content and AJAX Initialization
Use this workflow for content intended to be publicly available. Supplying an ID and a request nonce is not an ownership check for private records or orders. Interactive descendants such as sliders, swatches, and forms must initialize after injection; test the first open as well as later opens, not only the static builder preview.
Practical Example
Create a Quick View button inside a product loop. Use its current product ID under Fetching Post ID, open one native popup, and place a one-product query and public product details in that popup.
Troubleshooting
- Empty popup: check template publication, conditions, interaction, and record ID.
- Same record for every trigger: replace the fixed fetching ID with current-loop dynamic data.
- AJAX error: check the browser Network response, nonce/cache freshness, and blocked admin-ajax requests.
- Unresponsive controls after injection: verify their AJAX initialization and asset loading; static page success does not establish popup compatibility.