Embed SayWall on WordPress
Step-by-step guide to adding a SayWall testimonial widget to any WordPress site — no coding required.
Updated March 12, 2026
Overview
You can embed a SayWall widget on any WordPress site by adding a small snippet of HTML. There are three ways to do it depending on how you build pages:
| Method | Best for |
|---|---|
| Gutenberg Custom HTML block | Adding a widget to a specific page or post |
| Header/Footer plugin | Loading the script globally (recommended if you have multiple widgets) |
| Theme functions.php | Developer-managed global script injection |
All three methods use the same two-line embed code from your SayWall dashboard.
Get Your Embed Code
Before starting, copy your widget's embed code from SayWall:
In the SayWall dashboard, go to Widgets and click your widget.
Click the Embed tab inside the widget editor.
Copy the two-line embed code. It looks like:
<script src="https://saywall.io/embed.min.js" async></script>
<div data-saywall-widget="YOUR_WIDGET_ID"></div>Method 1 — Gutenberg Custom HTML Block
This is the simplest method for adding a widget to a specific page.
Open the page where you want the widget in the WordPress block editor.
Click the + icon to add a block. Search for Custom HTML and select it.
Paste the full two-line snippet into the Custom HTML block:
<script src="https://saywall.io/embed.min.js" async></script>
<div data-saywall-widget="YOUR_WIDGET_ID"></div>Click Update (or Publish) and then view the page. Your testimonial widget should appear where you placed the block.
If you use the Classic Editor (not Gutenberg), switch to Text mode in the editor and paste the snippet directly into the HTML where you want the widget.
Method 2 — Insert Headers and Footers Plugin
If you want to add the <script> tag globally (so it loads on all pages) without editing theme files, the Insert Headers and Footers plugin is a reliable option.
In your WordPress admin, go to Plugins → Add New, search for Insert Headers and Footers (by WPCode), and install it.
Go to Settings → Insert Headers and Footers (or Code Snippets → Header & Footer depending on the plugin version).
In the Scripts in Footer box, paste only the script tag:
<script src="https://saywall.io/embed.min.js" async></script>This loads the SayWall embed script on every page of your site.
Save the plugin settings. Now, on any page where you want to show the widget, add a Custom HTML block (as in Method 1) with just the <div>:
<div data-saywall-widget="YOUR_WIDGET_ID"></div>Since the script is already loaded globally, you only need the div on each page.
Method 3 — Theme functions.php
For developers who prefer managing scripts through the theme, enqueue the script via functions.php:
function saywall_embed_script() {
wp_enqueue_script(
'saywall-embed',
'https://saywall.io/embed.min.js',
[],
null,
true // Load in footer
);
}
add_action( 'wp_enqueue_scripts', 'saywall_embed_script' );Then place the widget <div> wherever you need it — in a template file, a page template, or a Custom HTML block:
<div data-saywall-widget="YOUR_WIDGET_ID"></div>The true parameter in wp_enqueue_script loads the script in the footer.
This is equivalent to using the async attribute — it doesn't block
rendering.
Page Builders
Elementor
In the Elementor editor, drag an HTML widget onto the page. Paste the full two-line embed code into the HTML editor.
Divi
Use the Code module. Paste the full embed code snippet directly.
Beaver Builder
Add an HTML module and paste the embed code.
Troubleshooting
Widget is not showing up
- Make sure the
embed.min.jsscript is loading — open your browser's Developer Tools (F12), go to the Network tab, reload the page, and look forembed.min.jswith a200status code - Check that your widget has at least one approved testimonial in SayWall
- Verify the widget ID in
data-saywall-widgetmatches the ID in your SayWall dashboard
I see a blank space where the widget should be
This usually means the script loaded but the widget has no approved testimonials, or the widget ID is wrong. Check both in your SayWall dashboard.
My security plugin is blocking the widget
Some WordPress security plugins (like Wordfence) can block external scripts. Add saywall.io to your allowed external domains list in the plugin settings.
The widget looks broken or styled incorrectly
SayWall widgets use Shadow DOM, which means your theme's CSS cannot affect them. If something looks off, check your widget's design settings in the SayWall dashboard. If you've set custom colors, try reverting to defaults first.
Need help?
Have a question or need assistance? Reach us at hello@saywall.io

