Skip to content

Host guide: WordPress

This content is for v1.x. Switch to the latest version for up-to-date documentation.

Three options, pick one:

With a plugin like WPCode, add a new “footer” snippet containing the standard embed tags:

<script>
window.ClaudiusConfig = {
apiUrl: "https://your-worker.workers.dev",
title: "Support",
theme: "auto",
};
</script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/PMDevSolutions/Claudius@1/cdn/claudius.css"
/>
<script src="https://cdn.jsdelivr.net/gh/PMDevSolutions/Claudius@1/cdn/claudius.iife.js"></script>

In a child theme, hook the same markup into wp_footer:

add_action( 'wp_footer', function () {
?>
<!-- paste the embed tags from option 1 here -->
<?php
} );

On a single page, a Custom HTML block with the embed tags works too — but the widget then only appears on that page.

  • Add your WordPress site’s origin to the worker’s ALLOWED_ORIGIN
  • Some optimization plugins (autoptimize, rocket) defer or combine scripts; if the bubble doesn’t appear, exclude claudius.iife.js from optimization
  • Caching plugins are fine — the embed is static and config lives inline