kavilo
Sign in

Guide

Adding it to WordPress

On a WordPress site you host yourself, or on WordPress.com on any paid plan, the chat goes in with one free plugin. You do not edit theme files, so it stays put through theme updates and theme changes.

1. Install WPCode

In your WordPress dashboard, open Plugins, add a new plugin and search for WPCode. Pick the one whose name starts with WPCode – Insert Headers and Footers, click Install Now, then Activate. It is free.

2. Paste the script tag into the footer

In the kavilo portal, open your bot's Embed tab and copy the script tag. Back in WordPress, open Code Snippets → Header & Footer in the left menu, paste it into the Footer box, and click Save Changes at the top right.

3. Clear the cache and check

If your site has a caching plugin, such as WP Rocket, LiteSpeed Cache or one from your host, clear its cache: until you do, visitors are served pages saved from before the chat. Then open your site in a private window. The chat button should be in the corner of every page.

Your domains

On the portal's Setup tab, Allowed origins must list the address visitors use, such as https://example.com. If your site also answers on www., list that too, and add your staging site while you test. A page at an address that is not listed cannot open a chat.

Other setups, and when it does not appear

The chat inside one page

To put the chat in the body of one page, such as your contact page, instead of in the corner of every page, copy the snippet under Or mount it inside a page on the Embed tab and paste it into a Custom HTML block on that page (in Elementor, an HTML widget). The corner snippet does not belong in a post or page: it would load on that one only.

Editing the theme instead

You can put the script tag in your theme's footer.php, just before </body>, but a theme update replaces that file and the chat disappears without a word. If you go this way, use a child theme. Block themes, which WordPress's own default themes have been for several years, have no footer.php to edit.

WordPress.com

WordPress.com allows plugins on every paid plan, from Personal up, so the steps above work there. A site on the free plan cannot add plugins or scripts, so the chat cannot go on it.

If the button does not appear

  • Cached pages. Clear the caching plugin's cache, and your host's or CDN's if there is one, then check in a private window.
  • Content-Security-Policy. Open the browser console on your site. A message mentioning Content-Security-Policy means a security plugin, your host or a CDN such as Cloudflare sends one. Add https://kavilo.cloud to its script, frame and connection rules, as the embedding guide shows.
  • An address that is not listed. With only https://example.com in Allowed origins, a visitor on https://www.example.com cannot chat, and the other way round.
  • Delayed JavaScript. A speed plugin that holds JavaScript back until the visitor interacts, such as WP Rocket's delayed JavaScript execution, makes the button appear after the first scroll or tap. That is harmless; exclude kavilo.cloud/widget.js from it if you want the button at once.

See it on a real WordPress site

Fernhill Tile & Stone is a WordPress site whose chat was added exactly this way, with WPCode's Header & Footer. The business is made up, but the site was built in WordPress.