WordPress

Integrate web chat into your WordPress site.

WordPress is a popular platform for hosting blogs and other CMS-driven websites. You have two choices for how to add our web chat widget to your WordPress site:

  1. Use our Webchat WordPress plugin.
  2. Add the JavaScript to your site yourself using Scripts n Styles plugin.

We recommend using our Webchat WordPress plugin as the most straightforward solution.


Use the Webchat WordPress plugin

To install our web chat widget onto your WordPress site:

  1. Log in to your WordPress admin console.
  2. From the left side menu, go to Plugins.
  3. Select Add New and search for Comapi.
  4. Select Comapi Webchat Plugin, and then select Install Now.

Once installed, ensure the plugin is activated. To do this, select the Activate link for the plugin on the Plugins page in WordPress.

To configure the plugin for all pages in your WordPress site:

  1. In WordPress, go to Settings > Comapi Webchat Settings.


    1279

  2. For API Space, enter the API Space GUID.
    To locate this, log in to the portal, go to Hub > API Space Details and select Copy for the API Space ID.

  3. Select Save Settings.

Go to your site to test. If the web chat widget doesn't show in the bottom right corner, double check you have followed the steps above correctly. You must also ensure you have added a team to the web chat channel.

Learn how in the Web chat channel guide.

You can also learn more about integrating the web chat widget and linking it to your own security in this article.


Integrate using JavaScript

By default, WordPress doesn’t allow JavaScript to be included in your pages, but it can be achieved using free and widely used WordPress plugins such as Scripts n Styles.

To embed the web chat widget using JavaScript:

  1. Log in to your WordPress admin console.
  2. In the left side menu, go to Plugins.
  3. Select Add New and search for Scripts n Styles.
  4. Select Install Now.

Once installed, ensure the plugin is activated. To do this, select the Activate link for the plugin on the Plugins page in WordPress.

To configure the plugin for all pages of your WordPress site:

  1. In WordPress, go to Tools > Scripts n Style.

  2. Scroll down until you find the Scripts (end of the body tag) section.

  3. In a new web browser tab, log in to the portal.

  4. Go to Channels > Configure.

  5. In the Web Chat section, select Code.

  6. Copy the JavaScript code from between the <script> tags.


    909

  7. Return to your WordPress admin and paste the copied JavaScript into the Scripts (end of the body tag) section.


    1279

  8. Select Save Settings.

Go to your site to test. If the web chat widget doesn't show in the bottom right corner, double check you have followed the steps above correctly. You must also ensure you have added a team to the web chat channel.

Learn how in the Web chat channel guide.

You can also learn more about integrating the web chat widget and linking it to your own security in this article.

📘

Enhance the plugin

Our plugin is open source, so if you want to contribute go to https://github.com/comapi/comapi-wordpress-plugin.