Most WordPress sites already hold the answers their visitors keep asking for: the fees, the delivery areas, the opening hours, the returns policy. They are just spread across pages nobody finds at eleven at night. A chatbot that answers from those pages is one line of code away, and on WordPress there are several sensible places to put that line. This guide covers which one to use, what changes on WordPress.com and on a WooCommerce store, and which WordPress pages are worth having the chatbot read.
The general path, from sign-up to a working bubble, is in how to add an AI chatbot to your website, and this post does not repeat it. Menu paths and plan rules below are from WordPress's own documentation, checked on 4 October 2026; TailGPT's prices are as of the same date.
Do you need a plugin to add an AI chatbot to WordPress?
No. TailGPT has no WordPress plugin, and it does not need one. The chatbot is installed with a single line of code, pasted just before the closing </body> tag of your pages:
<script src="https://…/widget.js" data-key="…"></script>
You copy your own line from the chatbot's page in TailGPT once you have chosen a plan. Everything else, the name, logo, colour, greeting, role and the pages it answers from, is held in the TailGPT dashboard. Changing the greeting next month does not mean touching WordPress again.
What you decide is how that line reaches the bottom of every page. A self-hosted WordPress site gives you three common routes, and WordPress.com has its own rules.
| Route | Suits | Survives a theme update? | What you need |
|---|---|---|---|
| A header-and-footer code plugin | Most site owners | Yes, the line lives in the plugin's settings | Permission to install plugins |
| The theme's footer, in a child theme | Classic themes you already customise | Yes, as long as it is in the child theme | File access and a child theme |
The wp_footer hook | Developers, classic or block themes | Yes, in a child theme or a small site plugin | Comfort editing PHP |
| WordPress.com | Sites hosted by WordPress.com | Yes | A plan that allows plugins, with hosting features activated |
Which way of adding the line should most people choose?
A header-and-footer code plugin is the right choice for most owners. These are general-purpose plugins that give you a box for code that should appear on every page, and many sites already have one for an analytics tag or a search-console verification code. If yours does, use it rather than installing another.
We are not recommending a particular one. Pick a maintained plugin from a source you trust, with a box labelled footer, body or "before </body>". Then:
- In TailGPT, open the chatbot and press Copy beside its code.
- In your WordPress admin, open the code plugin's settings.
- Paste the line into the footer or body box, not the header box. The install instructions say just before
</body>, and that is where the footer box puts it. - Save, then clear your site's cache (more on that below).
The advantage is that the line has nothing to do with your theme. Switch themes next year and the bubble stays.
How do you add the line to your theme's footer?
If you already edit your theme's files, the line can go straight into footer.php, on the line above </body>. Do it in a child theme, never in the theme itself. WordPress's theme handbook gives the reason: a child theme lets the parent theme "be updated without losing your modifications", and a file in the child theme with the same name as one in the parent replaces it. Copy footer.php into the child theme, paste the line above </body>, and save.
Two cautions. First, this only works on a classic theme. Block themes, the newer kind edited in the Site Editor, use HTML templates rather than PHP files, so there is usually no footer.php to copy; on a block theme, use the plugin or the hook. Second, if you are not already running a child theme, creating one for a single line is more work than the plugin route, for the same result.
How do you add it with the wp_footer hook?
The wp_footer hook is the route a developer will usually prefer, because it keeps the line in code under your control. WordPress's developer reference describes it as firing near the closing body tag, through the wp_footer() function the theme calls, and notes that it is theme-dependent: almost every theme calls it, but it is up to the theme's author.
Add this to your child theme's functions.php, or to a small site-specific plugin, with your own copied line inside the quotes:
add_action( 'wp_footer', function () { echo '<script src="https://…/widget.js" data-key="…"></script>'; } );
This works on classic and block themes alike, as long as the theme calls wp_footer(). Keep it out of the parent theme's functions.php for the same reason as above: the next theme update replaces that file, and the bubble disappears without anyone noticing until a customer mentions it.
Can you add an AI chatbot to a WordPress.com site?
Yes, on a paid plan that allows plugins. WordPress.com hosts the site for you and decides what code it may run. Its support page on code says JavaScript works "on sites with a plugin-enabled plan and activated hosting features", which rules out a free WordPress.com site. Its plugins page, on 4 October 2026, says "Installing plugins is available on all WordPress.com paid plans: Personal, Premium, Business, and Commerce plans." Plan features change, so check your own plan before you buy anything for this.
WordPress.com's own guide to adding header code recommends the free Insert Headers and Footers plugin by WPCode. With it installed and activated, go to Code Snippets → Header & Footer, paste your line into the Footer box and press Save Changes.
Why does the bubble not appear after you paste the line?
The most common reason on WordPress is a cache. Caching plugins, many hosts and any content delivery network in front of your site keep a saved copy of each page and serve that copy to visitors. Until it is cleared, visitors get the page as it was before you added the line.
After pasting, clear the caching plugin's cache, your host's cache if it has one, and the network's cache if you use one. Then open the site in a private browser window. If there is still no bubble, work down this list:
- Script optimisation. Some performance plugins delay, defer or combine JavaScript until a visitor scrolls or clicks. If the bubble appears late or not at all, try excluding
widget.jsfrom those settings. - The wrong address. The key works only on the website you added to TailGPT, with or without
www. A staging copy or your host's temporary address shows nothing until you ask TailGPT to add it; there is no screen for that. - No live plan. The bubble appears only while the account has a live plan, and it goes quiet when the month's questions run out.
- The wrong box. A header-only box, or a box the plugin applies to selected pages, will not put the line on every page.
When the bubble shows, the Chatbots page in TailGPT confirms it: the chatbot's state changes to Live once TailGPT sees the bubble loading on your own site.
Which WordPress pages should the chatbot read?
The pages your customers ask about, and very little else. When you add your website, TailGPT lists its pages from the site's own page list, its sitemap. Since version 5.5, WordPress has built one at /wp-sitemap.xml, and WordPress's announcement says it covers public post types, taxonomies, author archives and the homepage. SEO plugins often replace it with their own. Either way, the list includes pages nobody will ever ask a question about.
Keep these ticked:
- Service or product pages, with what each costs and what it includes.
- Fees, pricing or packages.
- Delivery, cancellation, returns and refund policies.
- Your FAQ page, if you have one.
- Contact, address and opening hours.
- Blog posts that answer a question customers actually send you, such as "how to prepare for your first appointment".
Untick these:
- Category and tag archives, which are mostly lists of links.
- Author archives.
- Old posts about events that are over and offers that have ended.
- Thank-you and form confirmation pages.
- Anything behind a login, such as a members' area. It cannot be read, and it was written for one person.
A physiotherapy clinic in Indore with 140 pages, most of them blog posts, will usually find fifteen or twenty that answer patients' questions. How to choose which pages your chatbot should read has a fifteen-minute audit for picking them. As of 4 October 2026, Starter reads up to 1,000 pages, and the free trial reads up to 500, so the limit is rarely the problem; stale and duplicate pages are.
What can a chatbot answer on a WooCommerce store?
It answers what your store's pages say, and nothing that lives only in your order system. WooCommerce runs on WordPress, so the install is the same as above. The difference is in what to tick and what to expect.
| A shopper asks | Where the answer comes from | Can the chatbot answer? |
|---|---|---|
| Does this kurta come in XL? What is it made of? | The product page | Yes, if the page says so in words |
| Do you deliver to Nagpur, and how long does it take? | Your shipping page | Yes |
| How many days do I have to return this? | Your returns or refund page | Yes |
| Do you take cash on delivery? | Your payment or FAQ page | Yes, if a page you ticked says so |
| Where is my order? | Your order system | No |
| Is this in stock right now? | Live stock levels | Only what the page said when it was last read |
TailGPT cannot look up orders, see a cart, check live stock, apply a coupon or take an order. It has no connection to WooCommerce itself, only to the pages you ticked. Untick the cart, checkout and My Account pages, which are either empty to a reader or built for one logged-in customer.
Prices and stock are as of the last read. There is no automatic refresh: you press Re-crawl when something changes, from a monthly allowance shared across your account (two a month on Starter as of 4 October 2026). What a store's chatbot should and should not answer is covered properly in AI chatbot for an online store: what it should answer.
How do you check the chatbot is working on your site?
Test it twice: once in TailGPT before the line goes in, and once on the live site after. Before you pay, Try demo on the chatbot's page lets you ask the finished bot real questions, and the free trial gives you 20. Spend them on the questions your inbox gets every week.
After pasting, open your site in a private window, find the bubble in the corner you chose, and ask one question your pages answer and one they do not. The first should come back with your own facts. The second should get a plain statement that your website does not cover it, rather than a guess. Then check the Chatbots page shows Live. The full journey, including what happens if a plan ends, is on how TailGPT works.
