Skip to content

Add chat to WordPress with a snippet

Add Hushdesk live chat to WordPress without the Hushdesk plugin. Paste the snippet into a footer scripts plugin or a child theme footer file.

Last updated 2 min read

On this page

You can add Hushdesk chat to a WordPress site right now by pasting one line of code in the site footer. This works on any self-hosted WordPress site, with or without WooCommerce. The Hushdesk plugin does the same without code and also verifies logged-in users, so prefer it when you can install plugins.

Before you start

  • Who can do this: a Hushdesk owner or admin to copy the code, and a WordPress administrator to paste it.
  • Plan: all plans.
  • What you need: either a plugin that adds header and footer scripts, or access to a child theme's files.
  • Time: about 3 minutes.

Step by step

  1. In Hushdesk, open Settings > Chat widget, then the Install tab, and press Copy under 1. Copy this code.
  2. In WordPress, pick one place to paste it:
    • A footer scripts plugin: install a "header and footer scripts" plugin, open its settings and paste the code into the footer (or "before closing body") box.
    • A child theme: paste the code into the child theme's footer.php, just above </body>.
  3. Save the setting or file.
  4. If you use a caching plugin, clear its cache.
  5. Open your site in a new tab. The chat button appears in the corner.
  6. In Hushdesk, check 3. Check it’s live on the Install tab. Your site's address appears within a minute.

What happens next

The chat shows on every public page. Chats arrive in your Hushdesk inbox as chat tickets, and your replies show in the shopper's chat window live.

Because the snippet only names your workspace and brand, every change you save in Hushdesk, such as colours or the welcome message, reaches the site without touching WordPress again.

Tips

  • Prefer a footer scripts plugin or a child theme. Code pasted into a parent theme's files is lost on the next theme update.
  • Paste the code once. Do not add it again inside page builders or individual pages.
  • Fill in your domain under Settings > Store before you test, so the widget is allowed on your site.
  • You can switch to the WordPress plugin at any time. See Install live chat with the WordPress plugin.

Troubleshooting

"This chat is not available on this site."

Your WordPress address is not on the allowed list. Check Website domain under Settings > Store or add the address under Other sites allowed to show the widget. See Choose which sites can show chat.

Nothing appears after pasting

A caching or optimisation plugin may still serve old pages. Clear its cache. If it combines or delays scripts, exclude helpdesk.js from those features.

"Not seen on your site yet. Open your store after pasting the code; it shows up here within a minute."

Load a public page of your site (not wp-admin), wait a minute and refresh the Install tab.

Frequently asked questions

How do I add Hushdesk chat to WordPress without the plugin?

Copy the snippet from Settings, Chat widget, Install and paste it into the footer of every page. The simplest way is a header and footer scripts plugin, which gives you a box for code that loads site-wide. You can also add it to your theme's footer if you edit theme files.

Will a WordPress theme update remove the chat snippet?

It can, if you pasted the code into the theme's own footer.php. Theme updates replace those files. A footer scripts plugin or a child theme keeps the code safe across updates, which is why we suggest one of those for most sites.

Does the chat snippet work with page builders like Elementor?

Yes. Page builders render normal WordPress pages, so a site-wide footer script loads on them too. Some builders also have their own custom code setting. Use one place only, so the snippet is not added twice to the same page.

What happens if the chat snippet is added twice?

The second copy is not needed and only adds an extra download. Keep one copy in one place, such as your footer scripts plugin, and remove any others from theme files, page builder settings or individual pages to keep things tidy.

Can I switch from the snippet to the Hushdesk plugin later?

Yes, at any time. Download the plugin from Settings, Chat widget, Install, WordPress, install it and press Connect to Hushdesk, then remove the snippet from your footer scripts plugin or theme. Your settings and tickets stay in Hushdesk, so switching changes nothing your customers can see.

Was this helpful?

Still stuck?

Chat with the Hushdesk team. A person answers on every plan.