How to add comments to a Wix site
Add EchoThread comments to Wix with Custom Code. Use Settings → Custom Code, not the HTML embed element — the embed is an iframe and breaks commenter sign-in.
On this page
Why Wix + EchoThread
Wix Blog has comments, but they are tied to Wix's own member system: a reader signs up to your Wix site before they can post. That is a lot of friction for one sentence, and it gives you no threading depth, no reactions, and no spam filtering you can tune.
EchoThread adds threaded replies, emoji reactions, ML spam filtering, and sign-in with Google, GitHub, X, or Facebook. The widget is under 60 KB gzipped and loads asynchronously from a CDN.
First: do not use the HTML embed element
Wix offers an Embed a widget / HTML iframe element, and it is the obvious place to paste a comment widget. It will not work properly, and the way it fails is misleading.
Wix's documentation states plainly that "the HTML and URL elements in our editor are iFrames". Code inside one runs on a Wix-owned address, not your domain. Two things follow: the widget cannot read which page of your site it is on, so every post shares one thread; and commenter sign-in fails, because EchoThread only returns a completed sign-in to a domain you have registered. Comments appear to load, and then nobody can sign in.
Use Settings → Custom Code instead. It injects into the page itself rather than an iframe.
Prerequisites
- A Wix site that is published and has a connected domain — Wix requires both before Custom Code will run
- An EchoThread account — create one free
- Your site's API key from the EchoThread dashboard
Register your domain first. In the dashboard, add your site's domain to the EchoThread site. Comments will display without it, but EchoThread only hands a completed sign-in back to a domain you have registered — so skipping this looks like "reading works, signing in doesn't".
Wix's connected-domain requirement and EchoThread's registered-domain requirement are the same prerequisite seen from two sides, so satisfying one satisfies the other.
Step 1 — Add the Custom Code
In your Wix dashboard go to Settings → Custom Code and add a new code snippet. Set Place code in to Body – end, and paste:
<script>
(function () {
var mount = document.createElement('div');
mount.id = 'echothread';
mount.setAttribute('data-api-key', 'YOUR_API_KEY');
document.body.appendChild(mount);
var s = document.createElement('script');
s.src = 'https://cdn.echothread.io/widget.js';
s.async = true;
document.body.appendChild(s);
})();
</script>
Replace YOUR_API_KEY with the public API key from your EchoThread dashboard. It is designed to live in page source — it only lets visitors read and post on your registered site.
The snippet builds the container in JavaScript rather than being plain HTML, because Wix's Custom Code injects into the page shell rather than into your layout. Creating the mount point at the end of the body puts the discussion below your post content.
Step 2 — Scope it to your blog
Wix lets you choose which pages a snippet applies to. Leave it on All pages and every page of your site — homepage, about, shop — gets its own comment thread, which is almost never what you want.
Choose Show on specific pages instead and select your blog post page. For the load setting, choose to load the code on each new page rather than once per visit, so the widget still appears when a reader moves from one post to the next without a full reload.
Each post gets its own discussion automatically: with no data-identifier set, EchoThread keys the thread to the address of the page it loads on. Keep your post URLs stable and the threads stay put.
Troubleshooting
Nothing happens at all
- Custom Code only runs on the published site with a connected domain — it does not run in the editor preview.
- Confirm the snippet is enabled and that the current page is in its page selection.
Comments load but sign-in does nothing
Two causes, in order of likelihood. First, you used the HTML embed element rather than Custom Code — see the warning above. Second, your domain is not registered on the EchoThread site; add it in the dashboard.
Every post shows the same comments
The classic symptom of the iframe embed: inside an iframe the widget sees the Wix frame address instead of your post URL, so every post resolves to one thread. Move the code to Settings → Custom Code.
The widget doesn't appear when navigating between posts
Set the Custom Code to load on each new page rather than once per visit.
Frequently asked questions
Why not use the HTML embed element?
Because Wix's HTML element is an iframe — Wix's own documentation says so. Code inside it runs on a Wix-owned address rather than your domain, so the widget cannot see which page it is on, and commenter sign-in fails because EchoThread only returns a completed sign-in to a domain you have registered. Use Settings → Custom Code, which injects into the page itself.
What do I need before Custom Code will work?
Your site has to be published and have a connected domain. That is a Wix requirement for Custom Code, and it happens to be the same thing EchoThread needs in order to allow sign-in, so there is one prerequisite rather than two.
Where does the widget appear on the page?
At the end of the page body. Custom Code cannot place markup inside a Wix layout — Wix builds the page and gives you a head, a body-start, and a body-end. For a blog post that puts the discussion below the content, which is where it belongs.
Will this slow down my Wix site?
No. The widget is under 60 KB gzipped and loads asynchronously from a CDN. You can also scope the Custom Code to your blog post pages only, so it is never fetched on your homepage or shop.
Ready to add comments to your Wix site?
Free for your first site. Set up in under 10 min.
Create free account