WordPress
Add your agent to WordPress websites.
Add your AI agent to WordPress sites using the embed code. Works with any WordPress theme.
Open Channels > Website embed, choose Chat widget, and copy the complete generated code. It contains two script tags. Keep both, including the configured widget URL and chatbot ID. For a sitewide no-code install, use the WPCode Footer field in Method 3.
Enable the Chat widget channel before testing on the public site.
Method 1: Theme Footer
Add the widget to all pages via your theme:
- Go to Appearance → Theme Editor (or Theme File Editor)
- Find
footer.phpin your theme files - Paste your embed code just before
</body> - Click Update File
The widget now appears on all pages.
Method 2: Custom HTML Block
Add to specific pages using the block editor:
- Edit the page where you want the widget
- Add a Custom HTML block
- Paste your embed code from Channels > Website embed
- Save the page
A Custom HTML block works only if your WordPress account can publish scripts. After saving, check the rendered page source for both tags. WordPress may strip them without unfiltered_html, particularly on Multisite. WordPress explains this permission.
Method 3: Plugin (Header/Footer)
Use a plugin to add scripts site-wide:
- Install WPCode, formerly called Insert Headers and Footers by WPBeginner.
- Go to the plugin settings
- Find the Footer section
- Paste your embed code from Channels > Website embed
- Save changes
This method doesn't require editing theme files.
Method 4: Child Theme
For themes that update frequently, use a child theme:
- Create a child theme for your current theme
- A developer can output both generated script tags through the
wp_footerhook. Test after theme updates.
This survives theme updates.
WooCommerce Sites
The widget works on WooCommerce sites automatically. Consider:
- Adding to product pages for product questions
- Adding to checkout for order support
- Using on specific pages via Custom HTML blocks
Page Builders
Some editors remove scripts from page content. Check the rendered source; if a tag is missing, use the WPCode Footer field instead.
Multisite
For WordPress Multisite:
- Add the code to each site individually, or
- Use a network-activated plugin to add to all sites
Caching Plugins
If using caching plugins (WP Super Cache, W3 Total Cache, etc.):
- Add the widget code
- Clear all caches
- Test the widget
Troubleshooting
Widget Not Appearing
- Clear your WordPress cache
- Check browser console for errors
- Verify the agent ID is correct
Theme Editor Not Available
- Some hosts disable theme editing
- Use a plugin method instead
- Or edit files via FTP
Widget Position Wrong
- Adjust in your agent's Design settings
- Check for theme CSS conflicts
Testing
After installation:
- Open your WordPress site in an incognito window
- Look for the chat bubble
- Send a test message
- Verify the response
Check the rendered page source for both generated script tags and the browser Network tab for the configured widget URL. If either tag is missing, check script permissions and the cache.
Next Steps
- Customize appearance
- Set up domain restrictions (add your WordPress domain)
- Add suggested messages