Skip to guide

TrolyPage

An autonomous Marketing & Sales operating system for businesses that want AI-powered omni-channel growth.

Contact Info

Follow Us

Install Website Chat on WordPress

Embed the TrolyPage script in the site-wide footer; no TrolyPage plugin is needed.

View the steps

Where the code goes

Example using a child theme; if your site already has a site-wide Custom Code field, you can use that instead.

  1. Child theme
  2. functions.php
  3. wp_footer
  4. Deploy
Illustration of adding the embed code to a website layout file, then checking the widget on the deployed page.
Original TrolyPage illustration, not a WordPress screenshot. Follow the path and steps below.
WordPress child themeEmbed example
Navigate to
wp-content/themes
Child theme
functions.php
Choose this location

functions.php · wp_footer

functions.php
add_action('wp_footer', function () {
    ?>
    <script async
      src="YOUR_STUDIO_WIDGET_SCRIPT_URL"
      data-token="YOUR_CHANNEL_TOKEN"
      data-server="YOUR_STUDIO_SERVER_URL"
    ></script>
    <?php
});
Use your real channel snippet; this shows placement only.Deploy
TrolyPage-authored code example; replace the placeholders with your complete channel snippet from Studio.

Follow each step.

Every step uses your channel’s real Website Chat snippet; the example on the overview page is not deployable.

  1. Publish the channel in TrolyPage Studio and copy its complete installation snippet.

  2. Back up the site, then open functions.php in the active child theme under wp-content/themes. Do not edit the parent theme directly: an update may overwrite your changes.

  3. In functions.php, register a wp_footer callback and output the copied script tag as illustrated. If your theme or host already provides a site-wide Custom Code field, you can instead paste the script directly into its Footer/Body end location.

  4. Deploy the change, clear site/CDN cache if present, then open a public page in a private window to check the widget.

Ask ChatGPT or Claude to install it

Works even if your website is not listed. Replace the placeholder with your Studio snippet, adjust the prompt if needed, then send it to an AI assistant with website access.

The button only copies; it does not send data. Without website access, the assistant should guide you. Never share admin passwords or API keys.

You can edit the text before copying.

Verify the installation

Open a public page with the snippet. Once the widget loads, return to your channel’s Install section in Studio and select Check again. Detection requires a signal from the live website.

Check in Studio

If the widget is missing

  • The theme must call wp_footer() for the hook method to work. Do not paste into one post if you want chat on every page.
  • Confirm the channel is Published and your website domain is allowed.
  • Check that the snippet appears only once and is not blocked by cache, CSP, or script blockers.
  • Open a public page in a private window, then select Check again; builder previews do not replace a live page.

Platform UI steps were checked against official documentation. This is a code-installation method, not a native TrolyPage plugin or app for that platform.

Read WordPress documentation

What can TrolyPage help with?

Pick what you want to improve. TrolyPage will call you with advice tailored to your needs.

Which features interest you?

Choose as many as you like.

Explore TrolyPage featuresWatch the 78-second video

We use your details to respond to your consultation request. Privacy policy