Integrations ★ WordPress
Testimonials on WordPress, in one script tag
The whole install is one line pasted into a Custom HTML block. What actually stops people is not the block — it is whether WordPress will let your account save a script tag at all, and the answer is different on self-hosted WordPress than it is on WordPress.com.
- Where the tag goes
- A Custom HTML block in the post or page editor. For every page at once, the same block in a template part or a widget area.
- Plan needed
- Self-hosted: an Administrator or Editor account on a single-site install. WordPress.com: a paid plan with hosting features activated.
01 Where the tag goes in the WordPress editor
In the block editor, the tag goes in a Custom HTML block placed wherever the testimonial section belongs.
- Open the page or post you want the testimonials on.
-
Click the + Block Inserter and search for
HTML, then click Custom HTML. Faster: type/htmlin an empty paragraph and press Enter. - Click Edit HTML to open the block’s editing modal — on WordPress 7.0 and later, the tag goes in its HTML panel.
- Paste the script tag into the code pane. The pane on the right previews the output; a script tag has nothing to draw there, so an empty preview at this point is normal.
- Press Update, then publish or update the page.
Drag the block by its six-dot handle to move the section up or down. The Custom HTML block has no sidebar settings of its own — there is nothing else to configure.
For every page at once. Put the same Custom HTML block into a template part instead of a page: in a block theme, that is Appearance → Editor → Patterns → the footer or a template you use everywhere. On a classic theme, Appearance → Widgets has a Custom HTML widget that does the same job in a sidebar or footer widget area. One block, every page it appears on.
02 Who is allowed to save the tag
Self-hosted WordPress has no plan gate — it has a permission gate. The
capability is called unfiltered_html, and WordPress describes it as what
“allows user to post HTML markup or even JavaScript code in pages, posts, comments and
widgets”. Without it, WordPress runs your saved content through
wp_kses() and strips disallowed tags including <script>.
- On a single-site install, Administrators and Editors have it. Authors, Contributors and Subscribers do not.
-
On Multisite, WordPress is explicit: “only Super Admins have the
unfiltered_htmlcapability”. A site Administrator on a network install cannot save the tag. -
The block will tell you which of those you are, if you ask it. WordPress’s
documentation for the Custom HTML block says that “starting in WordPress 7.0” it
“introduces separate editing panels for HTML, CSS, and JavaScript”, and that
those last two “are only available to users with the
unfiltered_htmlcapability”. So on 7.0 or later, a block offering you all three panels is a block that will keep your script tag; a block offering only HTML is the gate, showing itself before you have wasted a save on it.
WordPress.com is the one with a plan gate. The Custom HTML block is in the
same place, but WordPress.com lists the tags it holds back:
“To add the following tags, you will need a paid plan with hosting features activated:
embed, frame, iframe, form, input, object, textarea, script, style, link”.
A widget tag is a script tag, so it is on that list.
Note the second half of that sentence, because paying is only the first of two steps. A paid plan has to be activated on the site before it will accept custom code, and WordPress.com’s remedy for a tag that vanishes after saving is a single instruction: “Install at least one plugin on your site to activate your plan to accept custom code.” Any plugin will do — you are not installing it for what it does, you are installing it to flip the site into the tier that runs scripts. Which means the plan you need is a plugin-enabled one, since a plan that cannot install a plugin cannot take that step either.
Sources
- WordPress.org — Custom HTML block
- WordPress.org — Roles and Capabilities (unfiltered_html)
- WordPress.com — Add custom HTML
- WordPress.com — Add code to your site
Plan names and menu labels are the platform’s to change. If what you see differs from what is written here, the linked page is the authority — and tell us so this page gets fixed.
03 When the widget doesn’t show up
- You saved the block, and the tag is gone when you reopen it.
-
That is
wp_kses()doing its job: the account you saved from does not haveunfiltered_html, so the disallowed markup was removed when the post was saved. Nothing is broken and nothing needs reinstalling — publish the page from an Administrator account instead, or on Multisite ask a network Super Admin to save it once. Afterwards the block stays put; only the save is gated. - You are on WordPress.com, paid, and the tag still disappears.
- Hosting features have not been activated on the site yet. Install any one plugin, which is what flips the site into accepting custom code, and paste the tag again.
- You approved a new testimonial and the site still shows the old set.
-
This one is usually blamed on a caching plugin, and on WordPress it usually is not the
cause. A page cache stores your HTML, and your HTML only ever contains the one
unchanging script tag. The widget itself is served with
cache-control: no-store, so every visit fetches the current set of approved testimonials even when the surrounding page is served from cache. If the list looks stale, check the approval queue in Testymo before you clear anything. - The theme’s styles are fighting the widget.
- They cannot. The widget renders inside an open shadow root with its own reset, so theme CSS does not reach in and widget CSS does not leak out. If the section looks wrong, the cause is the container you dropped the block into — a narrow column or a fixed-height wrapper — not the theme.
04 What the one tag actually does
The line you paste is a plain external script. There is no plugin, no app to install, no account to connect on the WordPress side, and nothing to configure in the editor afterwards. Testymo generates the tag when you create a widget; the address in it is your widget’s own, and this is the live demo one:
<script src="https://testymo.com/w/demo.js" async></script> The server builds that script per request: the rendering code and your approved testimonials arrive together in one response, so the page makes one request and no follow-up fetches. The demo tag printed above weighs 16.7 KB of JavaScript, about 6 KB over the wire. That figure covers the demo widget's eight quotes. The testimonials ride inside the script rather than arriving in a second request, so a wall carrying thirty of them weighs thirty quotes' worth of text — measure the embed you paste in, not this one. The page-speed guide has the method behind that number, and the case for measuring whatever you embed rather than trusting the category.
It renders into an open shadow root at the exact spot the tag sits, which makes the styling isolation work in both directions: your WordPress theme cannot restyle the widget by accident, and the widget’s CSS cannot leak into your page. It sets no cookies, calls no third party, and reads nothing about your visitors. When you approve a new testimonial, it appears on the next page load — you never touch the site again.
05 The widget, running on this page
Everything below this line was drawn by that one script tag — the same file, on the same terms, that you would paste into WordPress. Eight approved testimonials in the wall design, rendered as a free plan renders them, footer link and all.
06 Where to go next
An embed script is one of three ways to put testimonials on a site, and it is not always the right one — a handful of quotes that will not change for a year are better hand-coded. The full guide to adding testimonials to a website prices all three routes: setup, upkeep, and page weight. Once you know the quotes are arriving, the layout patterns guide covers which shape to show them in, and getting permission first covers the part most sites skip.
The same tag, in another editor
- Webflow Code Embed element
- Wix Embed HTML element
- Squarespace Code block
- Shopify Custom Liquid section
- Framer Embed component
- Ghost HTML card
- Carrd Embed element
- Notion Via Super, or an embed block
- Bubble HTML element
- Kajabi Custom Code block
- Teachable Custom HTML block
- Podia Site-wide code field, or its native section
- Skool None — images and links only