Install guides

Add live chat to WordPress

Add the Dinghy live chat to WordPress with a header and footer plugin or a few lines in your child theme. You don't need a chat plugin.

Add the Dinghy tag with a header and footer plugin or your child theme.

Get your tag

It's in the Dinghy operator app, under Settings > Install.

HTML
<script src="https://chat.example.com/widget/loader.js" data-key="wk_your_public_key" async></script>

Then add your site under Allowed sites in Settings > Install, like https://www.example.com. If people also visit without www, add that too.

If you already have a plugin that adds code to your header and footer, like WPCode, use it. If not, install one from Plugins > Add New.

  1. Open the plugin's header and footer settings.
  2. Paste the Dinghy tag in the footer box, the one that prints before </body>.
  3. Save.

Open your site in a private window. The chat button should be in the corner.

Use your child theme

If you have a child theme, add this at the end of its functions.php. It prints the tag in the footer of every page:

PHP
add_action('wp_footer', function () {
  echo '<script src="https://chat.example.com/widget/loader.js" data-key="wk_your_public_key" async></script>';
});

Use a child theme, not your main theme. A theme update replaces the main theme's files and your change is gone.

WordPress.com

On WordPress.com, the Dinghy tag needs a plugin-enabled plan with hosting features activated. Self-hosted WordPress lets you add the tag with a plugin or child theme.

Check that it works

  1. Open your site in a private window.
  2. Click the chat button and send a test message.
  3. Check that the message appears in your Dinghy inbox.

No button? A caching plugin may be serving the old page, so clear its cache. Still missing? Open the browser's developer console. If loader.js failed, the address in the tag is wrong or a Content Security Policy blocks it. If the button shows but every message says "Not sent", add the exact address you're on to Allowed sites, www included. Troubleshooting has more.

Next

  • Change colors, the chat button and the words in Settings > Appearance. No code. The tag's data-primary and data-accent win over the setting. See Add the chat to your site.
  • If your site has accounts, you can show which logged-in user is chatting. See Show who is chatting.

Keep reading