# Wordpress

Want to run beautiful, customizable surveys on your WordPress site? With **Zigpoll**, you can capture customer feedback, offer discounts, or trigger polls based on behavior—no coding required. This guide covers two easy ways to integrate Zigpoll: using the **official WordPress plugin** or by pasting the embed script manually.

***

#### ✅ Option 1: Use the Official Zigpoll WordPress Plugin (Recommended)

For the easiest setup, install the **Zigpoll WordPress plugin** directly from your admin dashboard.

**🔗 Plugin Link:**

👉 Zigpoll WordPress Plugin on WordPress.org

**🔧 How to Install:**

1. In your WordPress Admin Dashboard, go to **Plugins → Add New**.
2. Search for **"Zigpoll"**.
3. Click **Install Now**, then **Activate**.
4. Once activated, go to **Settings → Zigpoll** in the sidebar.
5. Paste your **Zigpoll Account ID** (get it by going to Zigpoll **→** Settings).

> 📝 *The plugin handles everything: loading the embed script, assigning survey IDs, and injecting it on the pages you choose.*

***

#### 🛠 Option 2: Manually Add the Zigpoll Embed Script

If you prefer not to use a plugin, you can manually insert the Zigpoll embed script:

**Step 1: Copy Your Zigpoll Embed Code**

1. Open your Zigpoll dashboard.
2. Choose a survey and click **“Install”**.
3. Copy the provided JavaScript snippet:

```html
<script type='application/javascript'>
  ;(function () {
    window.Zigpoll = {
      accountId: 'YOUR_ACCOUNT_ID'
    };

    var script = document.createElement("script");
    script.type = "text/javascript";
    script.charset = "utf-8";
    script.src = "//cdn.zigpoll.com/static/js/main.js";
    script.async = true;

    document.head.appendChild(script);
  }());
</script>
```

**Step 2: Paste It into Your Site**

**Option A: Add to All Pages**

1. In your WordPress Admin Dashboard, go to **Appearance → Theme File Editor**.
2. Select the `footer.php` file.
3. Paste your Zigpoll script **just before the closing `</body>` tag**.
4. Click **Update File**.

**Option B: Add to a Specific Page**

1. Edit the page where you want the survey.
2. Switch to the **Code Editor** (or use a **Custom HTML block** if you're using Gutenberg).
3. Paste the Zigpoll script.
4. Save or update the page.

> ⚠️ *Only use the manual method if you’re comfortable editing theme files or working with HTML.*

***

#### ✅ You’re Done!

Zigpoll will now appear on your WordPress site—fully styled and behavior-driven. You can customize trigger settings (like exit intent or delay) directly from your Zigpoll dashboard without editing the code again.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zigpoll.com/integrations/wordpress.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
