WordPress

Add EasyChatDesk to a WordPress site through the theme footer, a snippets plugin or a block — and keep it out of your admin area.

Updated August 7, 2026

WordPress needs the same script tag as everywhere else. What differs is where you put it, and how to make sure a theme update does not delete it.

Three ways to add it

1. A code snippets plugin (recommended). Any snippets plugin lets you add a footer script that survives theme updates. This is the safest option if you do not want to touch theme files.

2. Child theme footer. Add the snippet before </body> in your child theme’s footer.php. Do not edit the parent theme directly — the next update will overwrite it.

3. A Custom HTML block in a footer widget area, if your theme has one.

The snippet itself:

<script>
  window.__ecd = { license: "YOUR-LICENSE-KEY" };
</script>
<script async src="https://cdn.easychatdesk.com/widget.min.js"></script>

Adding it programmatically

If you maintain the site yourself, hooking wp_footer from your child theme’s functions.php is the cleanest option:

add_action( 'wp_footer', function () {
    if ( is_admin() ) {
        return;
    }
    ?>
    <script>
      window.__ecd = { license: 'YOUR-LICENSE-KEY' };
    </script>
    <script async src="https://cdn.easychatdesk.com/widget.min.js"></script>
    <?php
} );

The is_admin() guard keeps the widget off your dashboard, which is worth doing — otherwise your own admin sessions show up as visitors.

Keeping it off specific pages

Wrap the output in a condition. For example, to exclude your checkout and account pages:

if ( is_page( array( 'checkout', 'my-account' ) ) ) {
    return;
}

Caching plugins

If you use a page cache, the widget is unaffected — it is a client-side script and does not vary per visitor. If you use a plugin that defers or combines JavaScript, exclude widget.min.js from combining. Combined-and-deferred third-party scripts are the usual reason a widget stops appearing after someone installs an optimisation plugin.

Page speed

Because the script is async and hosted externally, it does not run PHP on your server, add database queries or block rendering. That is the main practical difference between this and a plugin-based chat widget — see WordPress chatbot for the longer comparison.

Next: Shopify and WooCommerce.

Still stuck? Message us from the widget in the corner of this page, or get in touch. A person answers.