> ## Documentation Index
> Fetch the complete documentation index at: https://anam.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add the Anam Widget to WordPress

> Add the Anam Widget to a WordPress site using a code block or theme integration, then configure domain access and presentation.

Add a conversational AI avatar to your WordPress site using the [Anam Widget](https://anam.ai/docs/embed/widget/overview.md) and the WPCode plugin -- no coding required.

> [card] [Cookbook: Adding the Anam Widget to WordPress](https://anam.ai/cookbook/widget-wordpress)
>
> Step-by-step guide for embedding the widget using WPCode

## Quick Start

**1. Create a persona in Anam Lab**

Go to [Anam Lab](https://lab.anam.ai), create a persona, and configure its avatar, voice, and behavior. Navigate to the **Embed** tab and choose **Widget** to get your persona ID.

**2. Allowlist your domain**

In the **Embed** tab, choose **Widget** and enter your WordPress domain under **Allowed Domains**, then select **+** to add the origin. Select **Publish** before testing the embed.

Add the origin visitors actually use, including any custom domain. See [origin format and matching rules](https://anam.ai/docs/embed/widget/installation.md#domain-allowlisting).

**3. Install WPCode**

In your WordPress admin, go to **Plugins > Add New** and search for **WPCode**. Install and activate it.

**4. Add the widget code**

Go to **Code Snippets > Add Snippet** and create a new **HTML Snippet**. Paste:

```html theme={"system"}
<anam-agent agent-id="your-persona-id"></anam-agent>
<script src="https://unpkg.com/@anam-ai/agent-widget" async></script>
```

Set the insertion method to **Site Wide Header** and activate the snippet.

**5. Publish**

Click **Publish** in Anam Lab to make the persona live.

## Next Steps

> [card] [Widget Configuration](https://anam.ai/docs/embed/widget/configuration.md)
>
> Customize the widget's appearance and behavior

> [card] [Widget Events](https://anam.ai/docs/embed/widget/events.md)
>
> Listen for widget events


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.