Interactive demos on WordPress
Add an interactive demo to WordPress.
Export the demo as one HTML file, put it online or in your Media Library, and paste the snippet into a Custom HTML block.
Three steps
From the editor to WordPress.
Nothing to install on your site, and nothing of ours to load.
- 01
Export the demo
Open the arrow beside Export. Under On a web page, copy the snippet, then export the file.
- 02
Put it online
Upload it to the Media Library, or anywhere that serves a web page over https. In the snippet, change the file's name to its address.
- 03
Paste it into a block
In a new paragraph, type /html and press Enter for a Custom HTML block. Press Edit HTML, paste the snippet, and press Update.
The snippet
The snippet, ready to paste.
The editor's own snippet, with the file's full address in it.
<div style="position:relative; width:100%; padding-top:calc(62.5% + 78px); border-radius:12px; overflow:hidden">
<iframe src="https://fernbill.example/demos/fernbill.html" title="Fernbill's late invoices" data-demo="demo-fernbill" loading="lazy" allow="fullscreen; autoplay"
style="position:absolute; inset:0; width:100%; height:100%; border:0"></iframe>
</div>
<script>
(function () {
var frame = document.querySelector('iframe[data-demo="demo-fernbill"]');
// What happens in the demo, sent to this page's analytics: Google Analytics, Tag Manager, Segment,
// PostHog or Mixpanel, whichever it runs. Only the demo's own words, nothing about who's watching.
var events = {"ready":"demo_view","step":"demo_step","button":"demo_button","choice":"demo_choice","end":"demo_complete"};
function measure(data) {
var name = events[data.type];
if (!name) return;
var props = { demo: "Fernbill's late invoices" };
for (var key in data) if (key !== "protocol" && key !== "type") props[key] = data[key];
if (typeof window.gtag === "function") window.gtag("event", name, props);
else if (window.dataLayer && typeof window.dataLayer.push === "function") window.dataLayer.push(Object.assign({ event: name }, props));
if (window.analytics && typeof window.analytics.track === "function") window.analytics.track(name, props);
if (window.posthog && typeof window.posthog.capture === "function") window.posthog.capture(name, props);
if (window.mixpanel && typeof window.mixpanel.track === "function") window.mixpanel.track(name, props);
}
window.addEventListener("message", function (e) {
if (!frame || e.source !== frame.contentWindow || !e.data || e.data.protocol !== "demo/1") return;
measure(e.data);
});
})();
</script>The one change from the editor’s snippet is the address: the file’s name becomes where it is online, starting https.
The box keeps the demo’s shape at any width, with room for its controls. The file isn’t asked for until the demo’s scrolled near.
The lines under it pass views, steps and clicks to your page’s analytics, on Basic and Pro. Switch them off in Export and the snippet is the box alone.
How it looks
The demo, playing from its file.
Fernbill's late invoices, chased: a walkthrough that waits at each step for the viewer to click on.

This is the file itself, playing on our site. In your page it plays from wherever you put it, with its controls under it.
A walkthrough waits at each step until the viewer clicks on.
From its own help
What WordPress's help says.
Read on wordpress.org in October 2026. Each line rests on the pages linked under it.
- Where it goes
- A Custom HTML block: type /html in the editor.
- The snippet for the page
- Yes, for an Administrator or an Editor. Anyone without WordPress's unfiltered_html capability, like an Author or a Contributor, has the <iframe> taken out when the post is saved. On a network of sites, only a Super Admin has it.
- The pop-up
- Yes, for the same people: WordPress takes the <script> out for anyone else.
- The file itself
- Yes, for the same people: WordPress takes an .html file in the Media Library only from someone with unfiltered_html. Give the snippet its address there.
Checked October 2026, from WordPress’s own help: Custom HTMLRoles and Capabilitiesget_allowed_mime_types() (WordPress Developer Resources)
Squarespace, Wix, Ghost and the rest: every platform, from its own help.
Questions
WordPress and your demo.
Short answers about putting a demo on WordPress.
Who can add it?
An Administrator or an Editor. WordPress takes the frame out of a post saved by anyone without its unfiltered_html capability, like an Author or a Contributor. On a network of sites, only a Super Admin has it.
Can the file live in my Media Library?
Yes, uploaded by the same people: WordPress takes an .html file there only from someone with unfiltered_html. Give the snippet its address there.
Do I need a plugin?
No. The Custom HTML block is WordPress's own.
What about WordPress.com?
It has rules of its own: there, a Custom HTML block keeps the snippet only on a paid plan with hosting features switched on.
How do I change the demo later?
Export it again and put the new file where the old one was, at the same address. Nothing on your page changes.
Good to know
Where it stops.
- Over https
- A page served over https won't show a frame from an http address, so give the snippet one that starts with https.
- A server that won't be framed
- Some servers keep what they serve out of other sites' frames. If the demo's box stays blank, the server holding the file has to allow it.
- One address
- The snippet finds the file at its address. Move or rename the file, and change the address in the snippet too.
- The plans
- Every plan exports the file and its snippet: Free one demo, with our mark. The pop-up and the lines for your analytics are Basic's and Pro's.
Record your first demo.
It's free to start. Add the extension and press record.