What you need
- A Feedbot bot. Create one free from your site URL, then copy your bot id from Dashboard → Bot → Install.
- Admin access to WordPress.
- On WordPress.com, a paid plan. As of October 2026, WordPress.com says plugin installation is available on Personal, Premium, Business and Commerce. The pricing page lists Personal at $4/month billed yearly.
This is the snippet you will paste:
<script src="https://w.feedbotai.com/v1/feedbot.js" data-bot-id="YOUR_BOT_ID" async></script>How to add a chatbot to WordPress.org with WPCode
WPCode (formerly Insert Headers and Footers) is free and keeps the snippet safe from theme updates. This is the method we recommend for most sites.
- In wp-admin, go to Plugins → Add New Plugin, search for “WPCode” and click Install Now, then Activate.
- Go to Code Snippets → Header & Footer. WPCode’s own docs describe this screen.
- Paste the snippet into the Footer box.
- Click Save Changes.
- Open your site in a private window and send a test message. It appears in the Feedbot inbox.
Any other header-and-footer plugin works the same way. Put the script in the footer so it loads after your content.
Adding it without a plugin
If you don’t want another plugin, add the script in your theme. Use a child theme, or your change disappears the next time the theme updates.
| Theme type | Where to paste | Notes |
|---|---|---|
Classic theme (has footer.php) |
functions.php of a child theme, using the wp_footer hook (example below) |
Avoid editing footer.php in the parent theme |
| Block theme (Twenty Twenty-Four, Twenty Twenty-Five) | Appearance → Editor, open the Footer template part, add a Custom HTML block and paste the script | Only users with the unfiltered_html capability can save scripts. Admins on single sites have it |
| Page builder (Elementor, Divi) | The builder’s own custom code or footer code setting | Check that it outputs on every template |
The functions.php version:
add_action('wp_footer', function () { echo '<script src="https://w.feedbotai.com/v1/feedbot.js" data-bot-id="YOUR_BOT_ID" async></script>';});How to add a chatbot on WordPress.com
- Make sure the site is on a paid plan (see above).
- In the dashboard, open Plugins, search for WPCode and install it.
- Follow steps 2 to 5 of the WordPress.org method.
On the free plan, WordPress.com removes <script> tags from posts and blocks, so a Custom HTML block will not work there.
Show the chatbot only on some pages
The WPCode Header & Footer screen loads code on every page. To limit it, wrap the script in a condition in functions.php:
add_action('wp_footer', function () { if (is_page(['pricing', 'contact']) || is_product()) { echo '<script src="https://w.feedbotai.com/v1/feedbot.js" data-bot-id="YOUR_BOT_ID" async></script>'; }});is_product() comes from WooCommerce; remove it if you don’t run a store. To hide the chat on a page instead, flip the condition with !.
Identify logged-in users
If visitors log in (members, customers, LMS students), you can pass who they are so conversations and leads are tied to the account. The hash must be computed on the server with your identity secret, which PHP makes easy:
add_action('wp_footer', function () { if (!is_user_logged_in()) return; $u = wp_get_current_user(); $hash = hash_hmac('sha256', (string) $u->ID, FEEDBOT_IDENTITY_SECRET); printf( '<script>window.Feedbot=window.Feedbot||function(){(Feedbot.q=Feedbot.q||[]).push(arguments)};Feedbot("identify",%s);</script>', wp_json_encode(['userId' => (string) $u->ID, 'email' => $u->user_email, 'name' => $u->display_name, 'hash' => $hash]) );});Define FEEDBOT_IDENTITY_SECRET in wp-config.php, never in a template. Details are in Identify users.
WooCommerce notes
The widget works on WooCommerce like any other page. The bot can answer about shipping, returns, sizing and products from pages you import. It does not read your WooCommerce orders out of the box. On Pro you can add an HTTP Action that calls an endpoint you control, for example a small order-status route. See the ecommerce chatbot page for what store bots usually handle.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| No chat button | Page cache still serves the old HTML | Purge your caching plugin and host cache |
| Button appears, chat never opens | An optimization plugin delays or combines JavaScript | Exclude w.feedbotai.com/v1/feedbot.js from “delay JS” and minify settings |
| Script shows as text on the page | Pasted into a paragraph block, not Custom HTML | Use WPCode or a Custom HTML block |
| Works on staging, not live (or the reverse) | Allowed domains doesn’t list that domain | Add the domain in Bot → Install → Allowed domains |
| Block disappeared after saving | Your role lacks unfiltered_html |
Ask an administrator, or use WPCode |
Train it on your site
On the Free plan the bot learns from text and FAQ you paste in. From Starter you can import your WordPress site by URL or sitemap.xml (Yoast and Rank Math generate one at /sitemap_index.xml). Feedbot respects robots.txt and doesn’t re-crawl on its own, so click Refresh website after you publish changes. See Knowledge base for limits per plan and pricing for plans.
Next steps
- Connect Telegram or Slack so you can take over chats: Human handoff.
- Send hot leads to your CRM with CSV export or a webhook: Leads.
- All install options and
data-*settings: Install the widget.