Skip to main content
TruGen agents work on WordPress through the standard iframe embed. Works in classic and block editors, on any theme.

Prerequisites

  • A TruGen agent with an agent_id — see the quickstart
  • Access to a WordPress site with content-edit or theme-edit permissions
1

Open the page or post

Edit the page or post where you want the agent.
2

Add a Custom HTML block

Click + Add block and search for Custom HTML.
3

Paste the iframe

Replace YOUR_AGENT_ID with your agent ID, and substitute USER_NAME, USER_ID, and CONTEXT with values that identify the visitor.
4

Preview and publish

Publish the page. Visitors will be prompted for camera + mic permissions on first load.

Add via the Classic Editor

Switch the editor to Text mode, then paste the iframe HTML directly. Return to Visual mode to preview.

Add via theme (sitewide floating widget)

For a floating widget across the entire site:
1

Open the theme editor

Go to Appearance → Theme File Editor, or use a child theme.
2

Edit footer.php

Add before the closing </body> tag:
Prefer a child theme so your changes survive theme updates.

Common gotchas

  • Security plugins (Wordfence, iThemes) may strip iframes from post content. Whitelist app.trugen.ai in the plugin’s allowed sources.
  • Caching plugins (WP Rocket, W3 Total Cache) don’t affect the iframe itself but can cache your page — clear cache after editing.
  • HTTPS required. Browsers refuse to grant camera/mic on non-HTTPS pages, and modern WordPress hosts enforce HTTPS by default.

Domain allowlist

If your agent has an allowed_domains list, add your WordPress domain (example.com, www.example.com) to it.

What’s next

iFrame reference

Every iframe parameter documented.

Widget (React)

For WordPress sites built as headless React apps.