Add the Clema widget to WordPress

Copy the embed snippet from Leads, then Embed in Clema and paste it into your theme's `footer.php` file, or a footer code plugin, in WordPress so it loads on every page. Publish the site and confirm the chat bubble appears.

On this page

Before you start

This article covers installing the Clema website widget on a WordPress site. You need a widget already created in Clema, and permission to add custom code to your WordPress site.

Step 1: copy the snippet in Clema

  1. Step 1: Open Leads, then Embed.

    The page is titled Deploy.

  2. Step 2: Pick the widget you want to install from the Widget list.

  3. Step 3: Make sure your site's domain appears under Connected Domains.

    If it shows No domains configured yet., add the domain under Allowed domains on the Widget Setup page and save.

  4. Step 4: Under Embed Snippet, select Copy.

Step 2: paste it into WordPress

  1. Step 1: In your WordPress admin, open Appearance, then Theme File Editor, and select footer.php.

    This is the location Clema's Embed page gives for WordPress.

  2. Step 2: Paste the snippet just before the closing </body> tag.

  3. Step 3: Save the file.

  4. Step 4: If you would rather not edit theme files, install an "Insert Headers and Footers" plugin instead and paste the snippet into its footer box.

    Clema's Embed page lists this as the alternative. A plugin also keeps the snippet in place when the theme is updated.

Step 3: check it works

  1. Step 1: Open your live site in a new browser tab.

  2. Step 2: Look for the chat bubble in the corner you chose under Widget position.

  3. Step 3: Open it and send a test question.

  4. Step 4: In Clema, open Leads, then Lead Responses, to see the conversation.

Troubleshooting

The chat bubble does not appear.
Confirm the domain your WordPress site is served from is listed under Connected Domains in Clema, including the www form if your site uses it. Then confirm the site is published, not only saved.
The bubble shows on the preview address but not on your own domain, or the other way round.
Each address is a different domain. Add every one you want the widget on.
The widget disappeared after a site key rotation.
Copy the snippet again from Embed in Clema and replace the old one in WordPress.

Common questions

Is there a Clema plugin for WordPress?
No. The widget installs with one script tag, pasted into footer.php or added through a footer code plugin.
I cannot see Theme File Editor in my WordPress admin.
Some hosts and some themes hide it. Use an Insert Headers and Footers plugin and paste the snippet into its footer box.
Will a caching plugin affect the widget?
A cached page can keep serving the old HTML. Clear your site cache after adding the snippet, then reload the page.

Related articles