Menu
All plugins

Delayed Render

Keeps a Bricks template out of the page’s first HTML and renders it on the server later, when a condition you choose is met: a click, a timer, scrolling near it, the browser going idle, a tab or accordion opening, or a popup showing.

Version: 0.1.59 · Requires: WordPress 6.5+, PHP 8.1+, Bricks

What it does

  • The page loads with a small placeholder instead of the template.
  • When the trigger fires, the template is fetched from a REST endpoint and inserted, with the CSS and scripts it needs.
  • Forms, filters, pagination, tabs, accordions, sliders and galleries inside the template are re-initialised so they still work.
  • Good for heavy query loops, hidden tab or accordion content, forms in popups, and galleries behind a button.

Installation

  1. Upload and activate the plugin with Bricks active. There is no settings screen.
  2. Build and publish a Bricks template with the content you want to delay.
  3. In the Bricks editor add Delayed Render Template, pick the template and choose Load when.

Where shortcodes work but elements do not, use

This content will load when needed.
.

Loading strategies

  • Clicked (default) — click — The visitor presses the button in the placeholder
  • After delay — delay — The set number of milliseconds has passed
  • Near viewport — viewport — The placeholder is within the viewport margin
  • Browser idle — idle — The browser reports idle, or after a timeout
  • Parent tab or accordion opens — parent-open — The placeholder becomes visible after a tab or accordion opens
  • Popup or off-canvas is shown — popup-open — The placeholder becomes visible inside an open popup, modal or off-canvas panel

Settings

Template

  • Template — published and private Bricks templates, up to 200

Loading

  • Load when (default: Clicked)
  • Delay in milliseconds — After delay only, 0 to 60000 (default: 1000)
  • Viewport margin — Near viewport only (default: 200px 0px)
  • Load content in builder (default: Off)
  • Fade in loaded content — respects reduced motion (default: Off)

Placeholder

  • Button text — Clicked only (default: Load content)
  • Placeholder text (default: This content will load when needed.)
  • Minimum height — px, rem, em, vh, vw or %, to limit layout shift (default: empty)

Debug

  • Debug diagnostics — editors only (default: Off)

Shortcode attributes

template_id (required), strategy, delay, root_margin, placeholder, button, min_height, animate, debug, and id. Set id when the same template appears more than once on a page.

Debugging

Turn on Debug diagnostics and view the page while logged in as someone who can edit posts: a panel shows timing, loaded assets and each adapter’s result. For anyone, the wrapper’s data-drb-state shows dormant, scheduled, requesting, ready, failed or aborted.

Known limits

  • No site-wide settings; everything is set per element or shortcode.
  • Renders are never cached: each load is a fresh REST request.
  • A cached page stops working after 12 hours (the render token expires). Keep page-cache lifetimes shorter, or purge the cache.
  • Only Bricks assets, the template’s CSS and assets whose handle starts nl-bfe- are loaded. Scripts other plugins add only when their element renders are not.
  • Galleries use the plugin’s simpler grid and lightbox, not Bricks’ own.
  • Server-side filter handling covers taxonomy filters (select, radio, checkbox) only. Pagination combined with active filters is not yet confirmed reliable.
  • Re-initialising Bricks components relies on Bricks front-end internals, so it may need attention after Bricks updates.
  • Status messages from the loader are English only.