Guide
Add the widget to WordPress
WordPress works exactly like any other site — you paste the same snippet into a Custom HTML block. Here's the click-by-click.
Use a Custom HTML block
- 1
Copy your snippet
Open Pro dashboard → Website Embed and copy the snippet (it already contains your token). - 2
Edit the page
In the WordPress block editor, open the page or post where you want the estimator and click the + to add a block. - 3
Add a Custom HTML block
Search for Custom HTML, add it, and paste the snippet in. - 4
Publish
Click Preview to check it, then Publish (or Update).
The snippet
Custom HTML block
<iframe id="clearcost-estimator"
src="https://getclearcost.com/embed/YOUR_TOKEN"
title="Get an Instant Estimate"
style="width:100%;min-height:760px;border:0" loading="lazy"></iframe>
<script>
window.addEventListener("message", function (e) {
var d = e.data;
if (d && d.type === "clearcost-embed:height" && typeof d.height === "number") {
var f = document.getElementById("clearcost-estimator");
if (f && f.contentWindow === e.source) {
f.style.height = Math.max(300, Math.ceil(d.height)) + "px";
}
}
});
</script>Allow your domain
Add your WordPress domain under Website Embed → Allowed domains (include both the bare and www. versions). The widget only loads on domains you list. See the install guide for details.
Common gotchas
A theme or plugin strips the script
Some security plugins and the Classic Editor remove inline<script> tags. If the frame loads but doesn't resize, the auto-resize script was stripped. Either allow inline scripts for that page, or keep the iframe's min-height high enough (e.g.900px) so the final step isn't cut off.Caching
If you don't see the widget right away, clear your page/CDN cache (WP Rocket, LiteSpeed, Cloudflare, etc.). Your site should also be served over HTTPS — the estimator won't load inside an insecure page.Block editor vs. page builders
Elementor, Divi, and Beaver Builder all have an HTML/embed widget — paste the same snippet there. Avoid the “Shortcode” block; use HTML.