---
title: WordPress
description: The ContactUsIQ plugin (Connect, block, shortcode, feedback widget, Contact Form 7 adapter) or a one-file shortcode. Both post from the browser, so caching plugins never break the form.
---

Two routes: the full plugin ([download the zip](/samples/contactusiq-wp-plugin.zip), [README](/samples/wp-plugin/README.md)), or the single-file shortcode under [`samples/wordpress-shortcode`](/samples/wordpress-shortcode/README.md). Both need WordPress 6.4+ on PHP 8.1+.

Forms post straight from the visitor's browser to `api.contactusiq.com`, so page caching (WP Rocket, LiteSpeed, Cloudflare), `admin-ajax` and nonces are never involved and nothing runs server-side on submit.

## The plugin

**Status: the plugin source is in the repository; directory listing on wordpress.org is part of Phase 3.**

### Connect flow

1. Install and activate the plugin (slug `contactusiq`).
2. Settings, then ContactUsIQ, then **Connect**. A popup at `app.contactusiq.com` signs you in, picks a workspace and approves the site; ContactUsIQ issues a site-scoped API key and returns it to the plugin. No key is typed by hand.
3. The plugin prints `<meta name="contactusiq-verify" content="...">` in the site head and calls the verify endpoint, so the domain verifies without touching DNS. TXT verification remains available.
4. The site's admin email is registered as a recipient (confirmation by email applies from Phase 2).
5. A default "Contact" form is created and ready to place.

Until the Connect page exists you can paste a form id and Turnstile site key into the same settings screen.

### Placing a form

Block editor: add the **ContactUsIQ Form** block, pick the form, choose HTML or embed mode. Fields and labels come from the form definition.

Shortcode, for the classic editor, page builders and widget areas:

```text
[contactusiq form="au_xxxxxxx" mode="html"]
[contactusiq form="au_xxxxxxx" mode="embed"]
[contactusiq]
```

Attributes: `form`, `mode` (`html` or `embed`), `sitekey`, `redirect` (absolute URL for the `303`), `subject`, `button`. The bare `[contactusiq]` uses the default form id from settings.

HTML mode renders a `form` with `action="https://api.contactusiq.com/s/au_xxxxxxx"`, an off-screen empty `_honeypot`, hidden `_redirect`, `_subject` and `_page`, and the Turnstile `div` when a site key is known. Embed mode renders the `div` and `embed.js` script tag.

### Feedback widget

One switch places the [feedback widget](/feedback-widget) on every page or only on selected post types, and can pass the logged-in WordPress user (`data-user-id`, `data-user-name`, `data-user-email`) when the owner allows it. It is never printed in admin, feeds or embeds.

### Contact Form 7 adapter

Tick an existing Contact Form 7 form in the settings and its submissions are forwarded as JSON to the intake URL instead of WordPress mail, with the field map `your-name` to `name`, `your-email` to `email`, `your-message` to `message`, `your-subject` to `_subject` and `your-phone` to `phone`. Because this forward is server-to-server, the intake API sees the WordPress server's IP as the client and per-IP rate limits apply to the server. WPForms, Gravity Forms and Fluent Forms adapters are later.

### Hooks

`contactusiq_intake_url`, `contactusiq_form_fields`, `contactusiq_show_widget`, `contactusiq_widget_attributes`, `contactusiq_cf7_enabled`, `contactusiq_cf7_form_id`, `contactusiq_cf7_field_map` and the action `contactusiq_cf7_forwarded`. Example, add a phone field:

```php
add_filter( 'contactusiq_form_fields', function ( array $fields ) {
    $fields[] = array( 'name' => 'phone', 'label' => 'Phone', 'type' => 'tel', 'required' => false );
    return $fields;
} );
```

Site Health gains a "ContactUsIQ connection" test showing connection, verification and last delivery. Full developer notes: the plugin's [README](/samples/wp-plugin/README.md).

## The one-file shortcode

For sites that want the form without the plugin, copy `contactusiq-shortcode.php` to `wp-content/mu-plugins/` (it loads automatically) and insert:

```text
[contactusiq_form id="au_xxxxxxx" sitekey="0x4AAAAAAA_PLACEHOLDER" redirect="https://www.example.com/thanks/" subject="Website enquiry"]
```

Attributes: `id` (required), `sitekey`, `redirect`, `subject`, `button`. It outputs the same plain HTML form as the plugin's HTML mode, escaped with `esc_url`, `esc_attr` and `esc_html`, and enqueues the Turnstile script once when a `sitekey` is given.

## Troubleshooting

| Symptom | Cause and fix |
| --- | --- |
| The shortcode text shows on the page | The file is not in `wp-content/mu-plugins/`, or the shortcode name is misspelled. |
| Redirect works but nothing in the inbox | The site's domain is not verified, or you are testing on a staging hostname. The meta tag method suits WordPress well. |
| Turnstile does not render | Wrong `sitekey`, domain not on the Turnstile widget, or another plugin already loads Turnstile under a different handle. |
| `429` | 5 per IP per form per 10 minutes. |
