SayWall
Documentation

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:

MethodBest for
Gutenberg Custom HTML blockAdding a widget to a specific page or post
Header/Footer pluginLoading the script globally (recommended if you have multiple widgets)
Theme functions.phpDeveloper-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:

1
Open your widget

In the SayWall dashboard, go to Widgets and click your widget.

2
Open the Embed tab

Click the Embed tab inside the widget editor.

3
Copy the snippet

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.

1
Edit your page or post

Open the page where you want the widget in the WordPress block editor.

2
Add a Custom HTML block

Click the + icon to add a block. Search for Custom HTML and select it.

3
Paste the embed code

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>
4
Update and preview

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.

1
Install the plugin

In your WordPress admin, go to Plugins → Add New, search for Insert Headers and Footers (by WPCode), and install it.

2
Open the plugin settings

Go to Settings → Insert Headers and Footers (or Code Snippets → Header & Footer depending on the plugin version).

3
Paste the script tag in the Footer section

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.

4
Save and place the widget div

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

  1. Make sure the embed.min.js script is loading — open your browser's Developer Tools (F12), go to the Network tab, reload the page, and look for embed.min.js with a 200 status code
  2. Check that your widget has at least one approved testimonial in SayWall
  3. Verify the widget ID in data-saywall-widget matches 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.

Start collecting testimonials for free

Set up in minutes. No credit card required.

Get started free

Need help?

Have a question or need assistance? Reach us at hello@saywall.io