WordPress Chatbot Integration: One Snippet, Any Theme
This WordPress chatbot integration adds matram.ai with a single embed snippet. It works with any theme or page builder, and it trains by crawling your posts and pages.
Adding a chatbot to WordPress usually means installing yet another plugin that runs on every request. matram.ai skips that. You add one snippet, and it runs entirely in the browser.
Straight fact first: there is no matram.ai plugin in the WordPress directory. The integration is the embed snippet, added through a headers-and-footers plugin, your theme's custom-code box, or a Gutenberg HTML block. It takes about a minute and never conflicts with a theme or a core update. For the why-you-need-it angle, see the WordPress chatbot solution page.
What the WordPress integration does
matram.ai reads your WordPress content and answers from it, and the widget shows on your front end without touching PHP.
- Crawls your posts, pages and WooCommerce product pages into the AI's knowledge
- Shows the chat widget on every front-end page from one snippet
- Answers with citations back to the post or page it used
- Works with any theme and page builder, because it renders independently of them
- Loads asynchronously, so it does not block your page render
For WooCommerce it reads your published product and policy pages, so it answers product, shipping and returns questions. It does not read the WooCommerce order database, so it cannot look up a specific order's status.
Before you start
Prerequisites
- A WordPress site you can edit (self-hosted, or a plan that allows custom code)
- One of: a headers-and-footers plugin, theme custom-code access, or the block editor
- A matram.ai account (7-day free trial, no card)
How to add matram.ai to WordPress
Crawl your site, copy the snippet, paste it once. Three ways to paste, pick the one that fits how you work.
- 1
Crawl your site
Sign up at matram.ai/signup, enter your domain, and add /wp-sitemap.xml (WordPress generates one) so every post and page is indexed.
- 2
Copy your embed snippet
From the dashboard, copy the one-line install snippet. It carries your public bot id, nothing secret.
- 3
Paste it (option A: a headers/footers plugin)
Install a plugin like Insert Headers and Footers or WPCode and paste the snippet into the footer field. This is the safest route and survives theme changes.
- 4
Paste it (option B: theme or builder settings)
Elementor, Divi, Astra and GeneratePress all have a custom-code area under theme or site options. Paste the snippet there for a site-wide widget.
- 5
Paste it (option C: a Gutenberg HTML block)
For a single landing page rather than the whole site, drop the snippet into a Custom HTML block on that page.
- 6
Preview and confirm
Open your site, ask the bot something only your content would know, and confirm it cites the right page.
Connect WordPress on the free trial. No credit card required.
Book a demoTroubleshooting
The widget does not appear
The snippet is not loading site-wide. If you used a Gutenberg block it only shows on that page. Move it to a footer via a headers/footers plugin for every page.
It conflicts with my caching plugin
It should not: the widget loads async and is not a PHP plugin. If a page cache serves an old version, purge the cache after adding the snippet.
Answers miss recent posts
Re-sync the crawl after publishing. matram.ai re-crawls on a schedule, and a manual re-sync picks up new content immediately.
It shows on pages where I do not want it
Use the dashboard's page rules to hide it on specific paths, or place the snippet only on the templates where you want it.