# Enable Cloud Voice Live Chat on WordPress Website

Once you have generated the Live Chat code snippet, you can drop it into your WordPress site's footer. A chat widget then appears in the lower-right corner of every page, letting visitors start a live conversation with your agents. WordPress gives you two ways to add the snippet: through the built-in theme editor or with the WPCode plugin. Pick whichever suits your setup.

:::note
The "code snippet" is a small block of HTML and JavaScript that Cloud Voice generates when you set up a live chat channel. When a page loads, that code draws the chat widget and connects it back to your agents. You do not need to edit or understand the code, only paste it in exactly as copied.
:::

:::tip
If you are not sure which method to use, choose the WPCode plugin (Option 2). Code added through the theme editor lives inside the active theme's files, so it can disappear when the theme updates or when you switch themes. WPCode stores the snippet separately, so it survives theme changes.
:::

## Prerequisites

You have already created a live chat channel and copied its [Live Chat code snippet](/pbx/contact-center-guide/set-up-a-live-chat-channel/).

## Option 1: Add the snippet with the theme editor

Use this method when you want to add the snippet directly, without installing anything extra.

1. Sign in to your WordPress admin panel.
2. In the left sidebar, go to **Appearance > Themes** and click **Customize** on the theme you want to edit.

   
   ![Cloud Voice, the WordPress Themes page with the Customize button on the active theme](/images/pbx/wordpress-theme.png)

3. In the left sidebar, click **Pages** and open the page you want to edit.

   
   ![Cloud Voice, editing a page inside the WordPress Customizer](/images/pbx/wordpress-edit-page.png)

4. In the top-right corner, click the more-options icon ![More options icon](/images/pbx/move-vert-1.png), then select **Code editor**.

   
   ![Cloud Voice, opening the Code editor from the page options menu](/images/pbx/wordpress-code-editor.png)

5. Scroll to the bottom of the editor, paste the Live Chat code snippet, then click **Save**.

   
   ![Cloud Voice, the Live Chat snippet pasted at the end of the page footer](/images/pbx/wordpress-footer-pce.png)

:::caution
Paste the snippet at the very bottom of the code, after the existing content, and do not change anything already in the file. Editing or deleting the surrounding code can break the page layout.
:::

Open the live page and confirm the Live Chat widget now shows in the bottom-right corner.

![Cloud Voice, the Live Chat widget displayed on a published WordPress page](/images/pbx/wordpress-success.png)

## Option 2: Add the snippet with the WPCode plugin

WPCode is a free plugin that stores custom code separately from your theme, so the snippet is not lost when the theme updates. This is the recommended method for a live production site.

1. Sign in to your WordPress admin panel.
2. In the left sidebar, go to **Plugins > Add New Plugin**.
3. Install and activate the WPCode plugin:
   1. In the top-right search box, look up **WPCode**, then click **Install Now**.

      ![Search results showing the WPCode plugin with the Install Now button](/images/pbx/wordpress-install-plugin.png)

   2. Click **Activate** to turn the plugin on.

      ![The WPCode plugin with its Activate button after installation](/images/pbx/wordpress-activate-plugin.png)

   :::note
   Installing a plugin downloads it to your site; activating it is what actually turns it on. A plugin has no effect until you activate it, so do not skip the Activate step.
   :::

4. Add the code snippet to the footer:

   ![The WPCode Header & Footer page with the Footer text area](/images/pbx/wordpress-code-snippets-pce.png)

   1. In the left sidebar, go to **Code Snippets > Header & Footer**.
   2. In the **Footer** section, paste the Live Chat code snippet.
   3. In the top-right corner, click **Save Changes**.

:::tip
Pasting the snippet into the **Footer** section adds it to every page of the site, so the widget appears everywhere. This is the placement Cloud Voice expects, so paste it into Footer rather than Header or Body.
:::

Open the live page and confirm the Live Chat widget now shows in the bottom-right corner.

![Cloud Voice, the Live Chat widget displayed on a published WordPress page](/images/pbx/wordpress-success.png)

:::note
If the widget does not appear right away, your browser or a caching plugin may be showing an old copy of the page. Reload with a hard refresh or open the page in a private/incognito window to confirm.
:::
