WordPress Installation Guide#
This guide shows where to paste the Embed Code in WordPress.
Copy the Embed Code from your portal as described in Installation Overview.Two embed methods are supported:1.
Script-based loader (recommended): Adds an AI Agent widget bubble. The chat loads in an iframe popover when the visitor clicks the bubble.
2.
Iframe-based embed: Loads the AI Agent directly as an iframe appended to the page body (full-page style).
Best placement#
Script-based loader: Add site-wide (recommended) using a footer code injection method so the bubble appears on every page.
Iframe-based embed: Add only on the specific page where you want the embedded AI Agent.
Footer placement is safer because the embed code appends to document.body.
Script-based loader (AI Agent Bubble)#
1.
In WordPress Admin, install any plugin that lets you add scripts site-wide (Header/Footer injection).
2.
Open the plugin settings.
3.
Paste the Script-based loader code into the Footer section (site-wide).
5.
Purge cache if you use a caching plugin or CDN.
1.
Use a child theme (theme updates can overwrite your changes).
2.
Go to Appearance → Theme File Editor (if enabled).
3.
Open the theme file that outputs the closing </body> (commonly footer.php).
4.
Paste the Script-based loader code just before </body>.
Iframe-based embed (Direct AI Agent Chat)#
This method appends the iframe to the page body and is best used on a dedicated chat page (or any page where full-height chat is acceptable).Steps#
1.
Open the page where you want the embedded AI Agent.
3.
Paste the Iframe-based embed code into that block.
Adjust width/height#
You can control the embedded chat size by changing these lines in the embed code:iframe.style.width = "100%";
iframe.style.height = "100vh";
Smaller section: 600px (example: iframe.style.height = "600px";)
Verify installation#
1.
Open your website in an incognito/private window.
2.
Confirm the bubble or embedded AI Agent loads.
3.
Send a test message and confirm you receive replies.
Troubleshooting#
Purge WordPress cache and any CDN cache.
If using a plugin method, confirm it is set to load site-wide.
If using theme edit method, confirm you edited the active theme.
Check browser console for blocked requests or script errors.
Temporarily disable caching/minification plugins to rule out script rewriting.
Remove any duplicate insertion from multiple plugins or theme files.
Confirm it is not added in both theme files and a plugin at the same time.
Modified at 2026-02-19 07:20:52