# WB Polls

> Create polls, let visitors or members vote once, and show live results anywhere on your site.

Source: https://emdashcmseverything.com/plugins/wb-polls/

- Category: polls
- Status: available
- Version: 0.5.0
- Price: Unknown
- Compatibility: Not stated in the public registry profile
- License: MIT
- Maintainer: Wbcom Designs
- Download: https://plugins.emdashcms.com/plugins/@vapvarun.bsky.social/polls
- Repository: https://github.com/wbcomdesigns/emdash-polls
- Published: 2026-10-21

## Description

WB Polls lets a site owner ask a question and show live results on any EmDash page.

## What you get

- Create a poll with two to ten answers, one choice or several.
- Open it when you are ready, close it when voting should stop, or set a close time.
- Choose who can vote: anyone, or signed-in members only.
- Choose when results show: always, after a vote, or after the poll closes.
- Choose anonymous totals, or named results the site owner can see.
- Attach a poll to one page, to every entry of a content type, or to the whole site. A developer can also place a specific poll by id.
- Copy a poll into a new draft with no votes.

## How it fits together

The plugin is the engine: storage, voting routes and the admin screens. An EmDash plugin cannot add pages, so the visible poll ships as a site kit you copy in once. See Installation.

Guests can vote when you allow anyone and your host gives EmDash the visitor's address (Cloudflare, or `trustedProxyHeaders`). Members vote as their signed-in account. Only you create and manage polls.

## Installation

## Before you install

**1. Your site needs a sandbox runner.** Registry plugins run in a sandbox. Until the site has one, Admin, Plugins shows "No plugins configured" and there is no Registry in the menu.

- **Node:** in your site, run `npm install @emdash-cms/sandbox-workerd workerd`, then add `sandboxRunner: "@emdash-cms/sandbox-workerd/sandbox",` inside `emdash()` in `astro.config.mjs`.
- **Cloudflare:** add `import  from "@emdash-cms/cloudflare";` and `sandboxRunner: sandbox(),`. It needs the Workers Paid plan, the `worker_loaders` binding named `LOADER` (uncomment it in your Wrangler config) and an R2 bucket as `storage: r2(...)`, or the install stops with "Storage error while installing plugin". Then run `npm run deploy`.

Stop the dev server and start it again. **Registry** now shows in the admin menu.

**2. The plugin is the engine. Visitor pages come from its site kit.** A registry plugin cannot add pages to your site. Until you copy the kit, its addresses (for example `/account/votes`) show your site's 404 page. That is expected. The kit copy below takes one command.

Checked on EmDash 1.3.1 with the `blog` template, on Node and on Cloudflare Workers (registry install).

## Install

1. Admin, Registry, search **WB Polls**, Install, then accept the permissions.
2. From your site's root folder:

   ```bash
   kit="$(mktemp -d)" &&
     git clone --depth 1 \
       --branch v0.5.0 \
       https://github.com/wbcomdesigns/emdash-polls \
       "$kit/emdash-polls" &&
     "$kit/emdash-polls/scripts/add-to-site.sh" .
   ```

3. Paste the lines it printed. Restart the dev server.
4. Add the menu link it printed in Admin, Menus.
5. Open Polls in the admin.

After an update, run step 2 with the new tag.

Guide: https://github.com/wbcomdesigns/emdash-polls/blob/v0.5.0/docs/website/getting-started/install.md

## FAQ

**I updated the plugin and voting stopped.**
Copy the site kit again. A registry install answers at an id, not at `/polls/`. The current kit finds that id.

**Why is there no poll on the page after I create one?**
Create is a draft. Open the poll from the list. Then attach it to a page, a content type or the whole site, and put a poll slot on that template.

**Can guests vote?**
Yes, when you set Who can vote to Anyone and the host gives EmDash the visitor's address: on Cloudflare, or with `trustedProxyHeaders` set to a header your proxy writes itself and replaces (behind nginx, `x-real-ip`; never an appended `X-Forwarded-For`). Without it, guests are asked to sign in, and the Polls screen says so. One vote per visitor. Signed-in members vote as themselves.

**Is a 401 in the browser console a problem?**
No. A guest gets one 401 per poll from the member ballot check, and one on My votes. That is how the poll learns the visitor is not signed in. It then shows the guest view.

**Who sees voter names?**
Only you, and only on a named poll. Guests stay anonymous. Anonymous polls never store a name.

**Does it work in dark mode?**
Yes. The kit follows the visitor's system setting.

**Can I put a poll in the middle of an article?**
Not from a registry install. Attach it above or below the content, or place `` in a template. An in-text block needs a trusted install; that path is optional and does not change the registry product.

**Is there a paid version?**
No. Everything here is free.

**Why does it ask to read my content?**
So a poll attached to a draft stays hidden until you publish that page. WB Polls only checks whether a page is published and lists your content types by name.

## Changelog

## 0.5.0

Every poll page, vote and admin screen now fits Cloudflare's limit of 10 requests per plugin call.

- New      - Each poll keeps a running total, so results show in one read on any size of poll.
- New      - Results has Recount votes, which counts a poll again from the stored votes.
- Improve  - Deleting a poll hides it at once; its votes, names included, are removed as you open admin screens.
- Improve  - Open and close times are read from the poll's dates on every view.
- Fix      - On Cloudflare a guest vote no longer shows "Something went wrong" after it was saved.
- Fix      - On Cloudflare the Polls screen, Results, My votes and the Poll panel no longer fail on a busy site.

A poll from an earlier version is counted the first time it is opened. Copy the kit again after you update, from your site's root folder:

```bash
kit="$(mktemp -d)" &&
  git clone --depth 1 \
    --branch v0.5.0 \
    https://github.com/wbcomdesigns/emdash-polls \
    "$kit/emdash-polls" &&
  "$kit/emdash-polls/scripts/add-to-site.sh" .
```

## 0.4.0

- New: Read your content permission, so a poll on a draft page stays hidden until you publish it.
- New: a Set up visitor pages card and `scripts/add-to-site.sh` copy the kit in one command.
- Security: guests vote only where the host gives the visitor's address. Two votes sent at once by one voter count once.

## 0.3.0

- New: poll stats on the list, a results bar chart, and an optional This page's poll block for post text.

Older versions: https://github.com/wbcomdesigns/emdash-polls/blob/main/CHANGELOG.md
