How do I embed the widget on WordPress?
Three ways to embed the SilentChat widget on WordPress
1. With the SilentChat plugin (easiest)
The plugin is free and runs on WordPress 6.3 or later and PHP 7.4 or later.
- Download the plugin: silentchat.zip
- Upload it under Plugins → Add New Plugin → Upload Plugin and activate it.
- Enter your widget key (it starts with
pk_) under Settings → SilentChat and save.
You'll find the key in the dashboard under Chat Systems → Widgets → your widget → Install. Without a key, the plugin loads nothing. In the settings you can also hide the chat on individual pages (e.g. /checkout/*) or load it only on click; the shortcode [silentchat_link] creates a link that opens the chat.
Without the plugin: the snippet
The widget is a single snippet. You'll find the snippet with your key in the dashboard under Chat Systems → Widgets → your widget → Install. It looks like this:
<script
src="https://cdn.silentchat.de/silentchat.min.js"
data-widget-key="pk_YOUR_WIDGET_KEY"
data-api-url="https://api.silentchat.de"
data-ws-url="wss://ws.silentchat.de"
async
></script>
2. Via a header/footer plugin
- Install a plugin such as WPCode (formerly "Insert Headers and Footers").
- Open its header & footer settings.
- Paste the snippet into the footer section and save.
This survives theme switches and theme updates.
3. Directly in the theme
Paste the snippet into your theme's footer.php before </body>. Use a child theme — otherwise the change is lost on the next theme update.
Common issues
- Widget does not appear: clear the browser cache and the WordPress cache (e.g. WP Rocket, W3 Total Cache). Optimisation plugins that combine or delay scripts should exclude
silentchat.min.js. - Widget appears but never connects: check that
data-api-urlanddata-ws-urlare in the snippet. Best copy it straight from the dashboard. - Loaded twice: the snippet is in two places (plugin and theme) — remove one.
- A consent tool blocks the script (e.g. Borlabs Cookie, Real Cookie Banner, Complianz): add or allow
cdn.silentchat.deas a service there.