Embedding on WordPress
There are two common ways to add a script tag to WordPress, depending on
whether you can edit the theme.
- In wp-admin, go to Appearance → Theme File Editor (or edit your
child theme’s
footer.php directly via FTP/hosting file manager).
- Find the closing
</body> tag in footer.php.
-
Paste the LeadBox script tag just before it:
<script
src="https://cdn.jsdelivr.net/gh/Ricky1800/leadbox@v0.2.0/dist/leadbox.min.js"
data-endpoint="YOUR_ENDPOINT_URL"
data-title="Get a Free Quote"
data-accent-color="#2563eb"
></script>
- Save. The button should now appear on every page using that theme.
Editing theme files directly can be overwritten by theme updates. Prefer
a child theme, or Option B below, if you update your theme often.
- Install a plugin such as WPCode or Insert Headers and Footers
(both free, in the WordPress plugin directory).
- Go to the plugin’s settings page, find the Footer box, and paste in
the same script tag from Option A.
- Save. This survives theme updates since it’s stored separately from the
theme.
Elementor / page-builder-only embed
If you only want the widget on one specific page (not site-wide):
- Edit that page in Elementor (or your builder of choice).
- Add an HTML widget/element anywhere on the page.
- Paste the script tag into it.
Notes
- WordPress often loads jQuery and various theme scripts that could
otherwise clash with a form widget — LeadBox avoids this entirely by
rendering inside a Shadow DOM, so no WordPress theme or plugin CSS/JS can
reach in and restyle or break it.
- If your WordPress site is behind a caching plugin, purge the cache after
adding the script tag so the change goes live for visitors immediately.