Most WordPress sites answer the same handful of questions every day. Shipping times. Refund windows. Whether you support a particular integration. Every one of those is already written down somewhere on your site, and every one still lands in your inbox.
An AI chatbot trained on that content answers them for you. This guide adds one to WordPress in about five minutes, without installing a plugin, and covers the three ways to place the snippet depending on how your site is built.
Why not a plugin?
Most WordPress chatbot tools ship as plugins. That means another entry in your update queue, another thing that can conflict with your theme, and PHP running on every page load.
Cortexvia is a script embed instead: one stylesheet and one JavaScript file, both served from a CDN. Nothing touches your PHP execution path and there is nothing to keep updated. It works the same on a classic theme, a block theme, or a page builder. The WordPress guide page has the short version; this article is the full walkthrough.
What you need before you start
- A Cortexvia account. The free plan is enough to put one chatbot on a live page.
- Something to train it on. A PDF, a set of website pages, or a YouTube link. Your existing FAQ or shipping policy page is a good first source.
- Access to your theme's footer, through the WordPress admin, WPCode, or your theme files.
Step 1: Create the chatbot
Sign in to Cortexvia and run the four-step create wizard:
- Upload sources. Add a file, a website URL, or a YouTube link. This is what the chatbot answers from.
- Basic info. Name the chatbot, pick a model and a response style.
- Support contacts. The email or phone it hands off to when it cannot answer. A chatbot that says "I don't know" and stops is worse than one that routes to a human.
- Messages. The welcome message and any custom instructions.
Wait until your first source finishes processing. Until it does, the chatbot has nothing to answer from.
Step 2: Copy your chatbot key
Open the chatbot from the Chatbots area and copy its embed code. It contains your chatbot key, which looks like this:
ctx-cb-xxxxxxxxxxxxxxxxThe key connects the widget on your site to the chatbot you just trained. Nothing else needs configuring.
Step 3: Add the snippet to WordPress
The snippet goes immediately before the closing </body> tag:
<link rel="stylesheet" href="https://cdn.cortexvia.in/chatbotsdk-web.css" />
<script src="https://cdn.cortexvia.in/chatbotsdk-web.iife.js"></script>
<div id="cv-chat"></div>
<script>
window.ChatbotSDK.mount("#cv-chat", {
chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",
config: { mode: "chatbot" }
});
</script>Replace the placeholder key with your own. There are three ways to get this into WordPress; pick whichever matches how your site is built.
Option A: WPCode (recommended)
The safest option, because the snippet lives outside your theme files and a theme update can never wipe it.
- Plugins → Add New, search for WPCode, install and activate.
- Code Snippets → Header & Footer.
- Paste the snippet into the Footer box.
- Save.
Option B: Classic theme, footer.php
- Appearance → Theme File Editor.
- Open
footer.php. - Paste the snippet just above
</body>. - Update the file.
Do this in a child theme. If you edit the parent theme directly, the next theme update overwrites your change and the chatbot silently disappears.
Option C: Block theme
Block themes have no footer.php, so use the editor instead:
- Appearance → Editor → Patterns → Footer.
- Add a Custom HTML block.
- Paste the snippet and save.
Step 4: Test it like a visitor
Open your site in a private window and ask the chatbot a question your uploaded source actually answers. If you uploaded a shipping policy, ask about delivery times, in the words a customer would use.
Check three things:
- The launcher appears in the corner you configured.
- Answers come from your content, not generic filler.
- When you ask something outside its sources, it hands off to your support contact.
Common problems
The widget does not appear. Open your browser console. A 404 on the CDN files means the snippet was pasted incorrectly or the theme is stripping script tags. No errors at all usually means <div id="cv-chat"></div> is missing from the page source.
It appears but says it does not know anything. Your source has not finished processing, or it processed with a low quality score. Check the source status in the dashboard.
It disappeared after a theme update. You edited the parent theme directly. Move the snippet to WPCode or a child theme.
It works on some pages but not others. Your theme uses more than one footer template, or a caching plugin is serving an old version. Clear the cache first.
Does it slow down WordPress?
The loader waits until your page is interactive before fetching the widget, so it does not block your theme, your content, or the assets Core Web Vitals measures. In practice it adds one stylesheet and one script, both from a CDN.
That is a meaningful difference from plugin-based chatbots, which typically run PHP on every request and often enqueue their assets in the header.
Does it work with WooCommerce?
Yes. WooCommerce is a WordPress plugin, so the same footer embed covers your whole store. Add your shipping, returns, and product documentation as sources and the chatbot can answer order questions without touching your inbox. The small business guide covers which store pages to add first.
What to do next
Once it is live, the highest-value change is usually adding more sources. A chatbot trained on one page answers questions about one page. Add your FAQ, your returns policy, and your product documentation and it starts deflecting real support volume. The guide to training on your own content covers what to include and what to leave out.
After that, match it to your brand: colours, header name, logo, and welcome message are all configurable.
Frequently asked questions
Do I need the WPCode plugin?
No. It is the tidiest place to keep the snippet, but a child theme's footer.php or a block theme's footer pattern work just as well.
Can I show the chatbot on only some pages? WPCode supports conditional display rules, so you can limit the footer snippet to specific pages or post types without touching the theme.
Will it conflict with my caching or security plugins?
It is a plain script tag loaded from a CDN, the same as analytics. If a security plugin blocks external scripts, allow cdn.cortexvia.in.


