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

# WordPress plugin

> Add an AI chat widget to any WordPress site in minutes — no code required.

> [!NOTE]
>
> This page is for WordPress site owners who want to add a chat widget without writing code. If
> you are a developer building a custom integration, see the
> [drop-in widget](https://humain.mintlify.site/web/drop-in-widget.md) guide instead.

The **Humain Kiosk** WordPress plugin installs a floating chat widget on your site. You configure
it from the WordPress admin panel — no theme edits, no code, no build tools.

***

## Installation

**1. Install the plugin**

In your WordPress dashboard, go to **Plugins → Add New Plugin**. Search for
**"Humain Kiosk"**. Click **Install Now**, then **Activate**.

> [accordion] Screenshot — installing from the WordPress plugin directory
>
> Screenshot: Plugins → Add New → "Humain Kiosk" search result

Alternatively, download the `.zip` from [the plugin page](https://wordpress.org/plugins/humain-kiosk/)
and upload it via **Plugins → Add New Plugin → Upload Plugin**.

**2. Configure your credential**

Go to **Settings → Humain Kiosk**. Paste your device credential token into the
**Credential** field and click **Save settings**.

> [accordion] Screenshot — entering your credential
>
> Screenshot: Settings → Humain Kiosk → General tab → Credential field

> [!NOTE]
>
> You issue credentials from the Humain admin panel under **Kiosk → Credentials → Issue new
> credential**. The token is shown only once — copy it before closing that page.

**3. Configure the widget appearance**

Click the **Appearance** tab in **Settings → Humain Kiosk**. Adjust:

* **Position** — bottom-right or bottom-left corner
* **Theme** — Light, Dark, or Auto (follows the visitor's OS preference)
* **Title** — text shown in the widget header
* **Primary colour** — accent colour for the button and chat bubbles
* **Initial message** — greeting shown when the widget first opens

The preview on the right updates live as you change settings.

> [accordion] Screenshot — appearance settings with live preview
>
> Screenshot: Settings → Humain Kiosk → Appearance tab with live preview

**4. Embed the widget**

The plugin offers two ways to embed the chat widget:

> [tab] Shortcode
>
> Add `[humain_kiosk]` to any page, post, or widget area in the WordPress editor. The
> floating chat button will appear only on pages that contain this shortcode.
>
> > [accordion] Screenshot — shortcode in the Classic editor
> >
> > Screenshot: Classic editor with \[humain\_kiosk] shortcode
>
> You can also override settings per-instance:
>
> ```text theme={null}
> [humain_kiosk title="Sales" position="bottom-left"]
> ```

> [tab] Gutenberg block
>
> In the block editor, click the **+** button to add a new block. Search for
> **"Humain Kiosk"** and select it. The block embeds the widget — configure options from
> the block settings panel on the right.
>
> > [accordion] Screenshot — inserting the Humain Kiosk block in Gutenberg
> >
> > Screenshot: Gutenberg block inserter → "Humain Kiosk" block

If you want the widget to appear on **every page** without adding a shortcode, enable
**Global embed** in **Settings → Humain Kiosk → General**.

**5. Test with sandbox mode**

Before going live, enable **Sandbox mode** in **Settings → Humain Kiosk → General**. In
sandbox mode, conversations use stub AI responses — no LLM credits are consumed.

Open your site, click the chat button, and send a test message. You should receive a
predictable sandbox response. Once you're satisfied, uncheck **Sandbox mode** and save.

> [accordion] Screenshot — enabling sandbox mode
>
> Screenshot: Settings → Humain Kiosk → General → Sandbox mode toggle

***

## Advanced settings

> [accordion] Restricting the widget to specific pages
>
> By default, the widget appears on all pages when Global embed is enabled. To show it only
> on specific pages:
>
> 1. Disable **Global embed** in **Settings → Humain Kiosk → General**.
> 2. Add the `[humain_kiosk]` shortcode only to the pages where you want the chat button.
>
> Alternatively, use the **Page rules** setting to specify a list of page IDs or URL
> patterns where the widget should appear or be hidden.

> [accordion] Custom CSS classes
>
> > [!WARNING]
> >
> > The **Custom CSS class** field currently has no visible effect. The plugin sanitises the
> > value and passes it through to the widget script as `customClass`, but the installed
> > version of `kiosk-js` doesn't read that property anywhere — it isn't applied to the widget's
> > container or to anything inside it. Setting this field does not change the widget's
> > appearance today.
>
> Even once that wiring is fixed, a class on the widget's outer container won't let you theme
> the widget's internals with `--hk-*` custom properties (`--hk-primary`, `--hk-radius`, etc.).
> The widget renders inside a shadow root that sets those variables directly from your
> **Appearance** settings at mount time, so a `:root`- or ancestor-scoped `--hk-primary`
> declaration is always overridden. For colour and shape, use the dedicated **Primary color**
> field in **Settings → Humain Kiosk → Appearance** instead.

> [accordion] PHP filter hooks (for developers)
>
> The plugin exposes WordPress filter hooks for programmatic customisation:
>
> **`humain_kiosk_widget_config`** — modify the widget configuration before it is rendered:
>
> ```php theme={null}
> add_filter('humain_kiosk_widget_config', function ($config) {
>     // Add a custom initial message based on the current page
>     if (is_product()) {
>         $config['initialMessage'] = 'Hi! Do you have questions about this product?';
>     }
>     return $config;
> });
> ```
>
> **`humain_kiosk_session_metadata`** — attach custom metadata to each session (passed to
> the Humain API and available in your action endpoints):
>
> ```php theme={null}
> add_filter('humain_kiosk_session_metadata', function ($metadata) {
>     if (is_user_logged_in()) {
>         $user = wp_get_current_user();
>         $metadata['user_id']    = $user->ID;
>         $metadata['user_email'] = $user->user_email;
>     }
>     $metadata['page_url'] = get_permalink();
>     return $metadata;
> });
> ```

> [accordion] WooCommerce integration
>
> When WooCommerce is active, the plugin automatically enables the **WooCommerce integration**
> option in **Settings → Humain Kiosk → Integrations**. When enabled:
>
> * On product pages, the current product name, SKU, and price are added to the session
>   metadata so the AI can answer product-specific questions.
> * On the cart and checkout pages, the cart contents and total are included in metadata.
> * On the order confirmation page, the order number and status are included.
>
> Your kiosk's knowledge base and action endpoints can use this metadata to give contextual
> answers like "Yes, this item is in stock" or "Your order #1234 is being prepared."
>
> No additional configuration is required — enable the toggle and the metadata flows
> automatically.


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