HomeAdd a widgetWordPress

AI chat · WordPress

Add an AI chat widget to WordPress

An AI chat agent on every page of your WordPress site, switched on with one checkbox in Sorraia’s own plugin or one copy-paste into a footer box. It answers from your indexed pages and says so when the answer isn’t there.

Self-hosted WordPress: no plan needed · WordPress.com: a paid plan with hosting features activated

Free plan with no time limit, no card.

See it working

There is a live one on this page already: the chat button in the bottom corner is a Sorraia AI chat agent — ours, answering from the pages it has indexed on this site and saying so when the answer isn’t there, with the AI disclosure line every chat carries. Open it and ask it something.

How to add an AI chat widget to WordPress

Start with Sorraia’s plugin, because it has a switch for exactly this: under Settings → Sorraia, the Site-wide launchers card lists each chat agent on the site with a checkbox, and Save launchers adds it to the footer of every front-end page. Without the plugin the launcher still has to go site-wide rather than into a block — a Custom HTML block exists only on the page you added it to — so the steps below use WPCode’s Footer box, which outlives a theme change.

  1. In Sorraia, add the website and verify it — a DNS TXT record, or a meta tag in your homepage’s <head>. Verification is what lets you attach a widget to that site, so it comes before there is anything to paste.

  2. Save the agent, then copy the snippet from the Embed code box in the right-hand panel of the chat builder. (Chat has no install wizard — the box is the whole thing.)

  3. Install a snippet plugin: Plugins → Add Plugin → search “WPCode” → Install Now → Activate.

  4. Go to Code Snippets → Header & Footer.

  5. Paste the Sorraia snippet into the Footer box and click Save Changes. It now loads on every page.

  6. Open the live site (logged out, or in a private window) and confirm the launcher appears in the corner.

Where these steps come from:1

Verifying a WordPress site

Add the DNS TXT record if you manage the domain’s DNS. Otherwise the meta tag goes in your homepage’s <head>: a header-and-footer plugin such as WPCode has a Header box for exactly this.1

WordPress.org and WordPress.com are not the same gate

Self-hosted WordPress has no plan gate on any of this. WordPress.com filters script tags out of the Custom HTML block on the free plan, so nothing renders. Any paid plan — Personal, Premium, Business or Commerce — runs the snippet once its hosting features are activated: install a plugin, upload a third-party theme, or (on Business and Commerce) turn on backups. Commerce sites are activated automatically. Activation is one-time, and it moves the site’s default address to *.wpcomstaging.com.2345

Worth knowing for this one

  • WPCode prints its Footer box just above the closing </body> tag, and its own guide names live chat widgets among the scripts that belong there.1
  • Sorraia’s plugin prints the launcher through wp_footer(), the hook WordPress documents for printing scripts before the closing body tag, so a theme that leaves wp_footer() out shows no launcher.6
  • On a classic theme, editing footer.php in Appearance → Theme File Editor works too, but a theme update overwrites it unless you use a child theme, and DISALLOW_FILE_EDIT removes the editor altogether.78

What WordPress already has

The nearest thing WordPress.com offers is its WhatsApp Button block, on Premium, Business and Commerce: visitors tap it to message you on WhatsApp, and the conversation happens there rather than on the page. Answers on the page are the part you bring. Sorraia’s agent replies from what it has indexed on your site, tells the visitor when the answer isn’t there and offers your team instead, opens every chat with an AI disclosure line, and includes 25 conversations a month on the Free plan.9

What’s included

  • Answers from the pages it has indexed on your site
  • Says so when the answer isn’t there
  • An AI disclosure line on every chat
  • 25 conversations a month on Free
  • Live with one copy-paste

Free plan with no time limit, no card.

Questions

Where is the chat switch in Sorraia’s WordPress plugin?

Under Settings → Sorraia, in the Site-wide launchers card, once the plugin is connected and the site has a chat agent. Tick the agent, press Save launchers, and it appears in a corner of every front-end page. A launcher can’t go in the block or a shortcode, because it floats over the whole site.

Why is the launcher missing from most pages after I used a Custom HTML block?

Because a block exists only on the page you added it to, so the launcher shows there and nowhere else. A floating chat belongs in the footer of every page, which is where the plugin’s checkbox and WPCode’s Footer box put it.

Header or Footer box in WPCode for the chat?

Footer. The chat loader attaches the launcher to the page’s body the moment it runs, and while the header is loading there is no body yet, so nothing appears.

Does the chat agent run on WordPress.com?

On a paid plan, yes. Plugins install on Personal, Premium, Business and Commerce, so Sorraia’s plugin or WPCode can add the launcher once the plan’s hosting features are active; the free plan runs neither.

What happens to the chat when I switch WordPress themes?

With Sorraia’s plugin or WPCode, nothing: both add the launcher from outside the theme, through the footer hook themes call. A snippet pasted into the old theme’s footer.php leaves with that theme.

Sources

  1. WPCode header and footer · wpcode.com
  2. Custom HTML block (WordPress.com) · wordpress.com
  3. Code on WordPress.com · wordpress.com
  4. Activating a WordPress.com plan · wordpress.com
  5. Plugins on WordPress.com · wordpress.com
  6. wp_footer() · developer.wordpress.org
  7. Editing files · developer.wordpress.org
  8. wp-config.php · developer.wordpress.org
  9. WhatsApp Button block (WordPress.com) · wordpress.com

Each page read and checked on 20 October 2026.

Add an AI chat widget to WordPress

Build it in Sorraia, put it live on your WordPress site with one copy-paste, and change it later without touching the embed again.