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.

Add the widget to all pages via your theme:

  1. Go to Appearance → Theme Editor (or Theme File Editor)
  2. Find footer.php in your theme files
  3. Paste your embed code just before </body>
  4. Click Update File

The widget now appears on all pages.

Method 2: Custom HTML Block

Add to specific pages using the block editor:

  1. Edit the page where you want the widget
  2. Add a Custom HTML block
  3. Paste your embed code from Channels > Website embed
  4. 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:

  1. Install WPCode, formerly called Insert Headers and Footers by WPBeginner.
  2. Go to the plugin settings
  3. Find the Footer section
  4. Paste your embed code from Channels > Website embed
  5. Save changes

This method doesn't require editing theme files.

Method 4: Child Theme

For themes that update frequently, use a child theme:

  1. Create a child theme for your current theme
  2. A developer can output both generated script tags through the wp_footer hook. 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.):

  1. Add the widget code
  2. Clear all caches
  3. 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:

  1. Open your WordPress site in an incognito window
  2. Look for the chat bubble
  3. Send a test message
  4. 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