Skip to content

WordPress · with ChatOnTime

How to add live chat to a WordPress website

The short answer

Copy your ChatOnTime widget code, install the free WPCode plugin, and paste the code into Code Snippets → Header & Footer → Footer. Save, and the chat bubble appears on every page. No theme files to edit.

Before you start

  • A ChatOnTime account (the 4-day trial needs no card).
  • Your widget code, from Installation in the ChatOnTime dashboard. It is one line and already holds your workspace key.
  • A WordPress login that can install plugins (Administrator).

The code you will paste

It looks like this. Copy yours from Installation in ChatOnTime: it already holds your own workspace key.

<script src="https://chatontime.com/widget.js" data-workspace="YOUR-WORKSPACE-KEY" async></script>

Step by step

  1. Copy your widget code

    In ChatOnTime, open Installation and click the copy button next to your widget code.

  2. Install WPCode

    In WordPress, go to Plugins → Add New Plugin, search for “WPCode”, then install and activate “WPCode – Insert Headers and Footers”.

  3. Paste the code in the footer

    Go to Code Snippets → Header & Footer. Paste your widget code into the Footer box and click Save Changes. Code in that box loads before the closing </body> tag on every page.

  4. Check it

    Open your site in a private window. The chat bubble shows in the bottom corner, and Installation in ChatOnTime turns “Connected”.

Check that it worked

  • Open your website in a private window and look for the chat bubble in the bottom corner.
  • Send yourself a test message and answer it from the ChatOnTime inbox.
  • In ChatOnTime, Installation shows “Connected” once the widget has been seen on your site.

Checked October 2026 against each provider’s own help pages. Menus move — if a label differs on your screen, look for the nearest match.

Problems and questions

The chat bubble does not appear
Clear any page cache (caching plugins and CDNs often keep the old page), then reload. Check that the line sits before the closing </body> tag and was saved.
It says the widget is not allowed on this domain
Allowed domains in Widget Settings limit where the widget works. Add your domain there; adding example.com also covers www.example.com and other subdomains. You can list up to 5.
Can I paste it into footer.php instead?
On a classic theme you can, just before </body>, but a theme update overwrites that file, and newer block themes have no footer.php at all. The plugin keeps the code safe across theme changes.
Will live chat slow down my WordPress site?
The widget code loads with the async attribute, so the browser keeps rendering your page while the chat loads.
Does it work on WooCommerce pages?
Yes. The footer code loads on every page WordPress serves, including shop, product and cart pages.
Does it work on WordPress.com?
Self-hosted WordPress (WordPress.org) can install plugins freely. On WordPress.com, installing plugins needs a paid plan that allows them.
What happens if I deactivate WPCode?
The code stays saved in WordPress but stops loading, so the chat disappears until you turn the plugin back on.

Sources: wpcode.com/docs/using-the-global-header-footer-settings, wordpress.org/plugins/insert-headers-and-footers

Built and run by Workaholic Developers.