WordPress
Three ways to add the LeFlux snippet to WordPress, fastest to most explicit.
Option A — header/footer plugin (recommended)
Easiest, theme-independent, survives theme updates.
-
Install WPCode (formerly Insert Headers and Footers) or any equivalent.
-
In WordPress admin → WPCode → Header & Footer.
-
In the Footer section paste:
<script src="https://leflux.xrlabs.app/embed.js" async></script> -
Save.
-
Visit your site in an incognito window to verify the launcher appears.
Option B — theme editor
Works on classic themes that expose template files.
- WordPress admin → Appearance → Theme File Editor.
- Open
footer.php. - Right before
</body>paste the snippet from Option A. - Update file.
Themes that update via the theme store will overwrite this on every update. Prefer Option A unless you use a child theme.
Option C — block theme (FSE) site editor
For full-site-editing themes (Twenty Twenty-Four+, Spectra, Kadence, etc).
- Appearance → Editor → Patterns (or Templates → Footer).
- Add a Custom HTML block at the bottom of the footer template.
- Paste the snippet, save.
Caching gotchas
If your site uses WP Rocket, WP Super Cache, W3 Total Cache, or LiteSpeed Cache:
- Clear the cache after pasting the snippet, otherwise visitors see a stale page without the widget.
- Some caches inline + minify external scripts — add
https://leflux.xrlabs.app/embed.jsto the JS exclusion list so it’s loaded as-is. Don’t combine it with other scripts.
CDN gotchas
If you proxy through Cloudflare:
- The
embed.jsrequest itself isCache-Control: no-cacheso each visitor always gets the latest bundle. No special Cloudflare config needed. - If you have Rocket Loader enabled, LeFlux may load LATE. Disable Rocket Loader on the page or add
data-cfasync="false"to the script tag.
Verification
Open Chrome DevTools → Network → reload. You should see two requests to leflux.xrlabs.app:
/embed.js— small loader/leflux-agent.js— the main bundle (~150 KB gzipped)
If only /embed.js appears and /leflux-agent.js is missing or 4xx, the site init was rejected because your domain isn’t in the allowed-host list. Open the LeFlux dashboard → Settings → Allowed hosts and add your WordPress site’s domain (and www. variant if you use one).
Multilingual sites (Polylang / WPML)
The widget auto-mirrors the visitor’s typed language per turn. You don’t need to install separate snippets for each language. One token covers all languages on the same domain.