Skip to content

WB Polls provides shortcodes to embed polls, display creation forms, and show activity polls anywhere on your site. This reference covers every available shortcode with its attributes and usage examples.

Shortcode Purpose Key Attribute
[bp_polls] Display a BuddyPress activity poll activity_id (required)
[wbpoll] Display standalone poll(s) id (required)
[wbpoll_create] Show a poll creation form None required
[wbpoll_list] Show a grid of standalone polls None required

The Poll Dashboard page is template-based, not shortcode-based. It is created on plugin activation and the plugin fills in its content. Surveys have their own shortcode, [wbsurvey id="123"]; see Surveys Guide.

Embed a BuddyPress activity poll on any page or post.

[bp_polls activity_id="123"]
Attribute Type Required Description
activity_id integer Yes The BuddyPress activity ID containing the poll

The shortcode renders the full poll from the specified activity, including the question, all answer options with voting controls, vote percentages and counts, voter avatars (if enabled), media attachments, and a submit button.

Activity polls and this shortcode need BuddyPress.

Open the activity post in BuddyPress and check the URL. For example, in yoursite.com/activity/p/456/, the activity ID is 456.

Setting Effect on Display
Hide until voted Results hidden until user votes
Show percentage Displays “45%” alongside vote counts
Display voters list Displays voter avatars next to options
Show N voters Controls how many avatars show before the “+N” button
Poll Background Color Sets the color of result progress bars

When using the BuddyBoss platform with BBPress, a Polls button appears in the forum editor toolbar. Click it to insert the [bp_polls] shortcode directly into forum topics and replies.

Shortcode Poll Display

Embed one or more standalone polls on any page, post, or widget area.

[wbpoll id="36"]

Display several polls together by separating IDs with commas:

[wbpoll id="36,37,38"]

Multiple Polls Grid Display

Attribute Type Default Description
id string Required Poll ID or comma-separated IDs
style string modern Visual style: modern or classic
show_title integer 1 Show the poll title: 1 for yes, 0 for no (modern style). Use 0 when the widget or section around the poll already shows a title.

Basic poll:

[wbpoll id="36"]

Several polls in a row:

[wbpoll id="36,37,38"]

Classic visual style:

[wbpoll id="36" style="classic"]

Poll in a widget that has its own title:

[wbpoll id="36" show_title="0"]

Modern Style (default): Shows a status badge, poll title and description, vote count, answer options with a voting interface, results with progress bars, and a comments section if enabled.

Classic Style: Provides a simplified layout with a legacy voting interface and basic results display.

From the Dashboard: Go to your Poll Dashboard and find the poll card. The shortcode including the ID is displayed on each card.

From WordPress Admin: Go to WB Polls > WB Polls in WP admin and hover over a poll. The ID is in the link, or copy the shortcode from the poll editor.

Only published polls display through the shortcode. Draft and pending polls return empty content. Expired polls show results but no voting controls.

Add a poll creation form to any page on your site.

The Poll Dashboard has its own Create Poll button and does not use this shortcode. Use [wbpoll_create] when you want to add a creation form to other pages such as a custom landing page or member area.

[wbpoll_create]
Attribute Type Default Description
title string “Create New Poll” Custom heading text for the form
redirect string Dashboard URL Where to redirect after poll creation

Default form:

[wbpoll_create]

Custom heading:

[wbpoll_create title="Start a New Poll"]

Custom redirect after creation:

[wbpoll_create redirect="https://yoursite.com/thank-you"]

Both customized:

[wbpoll_create title="Share Your Opinion" redirect="/polls/success/"]

For logged-in users with permission: The form shows a poll title input, description editor, poll type selector, duration options, answer option fields with add/remove/reorder controls, advanced settings, and a submit button.

For logged-out users: A login notice with a link to the login page.

For users without permission: A permission denied message.

The creation form includes dynamic answer management with add, remove, and reorder controls. Drag-to-reorder lets you sort answer fields. Media attachments are available for image, video, and audio poll types. A date picker handles poll expiration settings. Validation enforces required fields and character limits.

Shows standalone polls as a grid of cards, each with its type, status, vote count, date and a View Poll link.

[wbpoll_list]
Attribute Default Description
count 10 Polls per page (1 to 100)
columns 3 Columns on desktop (1 to 4). Three or four columns drop to two on tablets, and every grid is one column on phones
orderby date date, title, votes or rand
order DESC ASC or DESC
ids (empty) Comma-separated poll IDs to show, in that order
author (empty) User ID of the poll author
status all all, active, ended or scheduled
pagination yes Show page links below the grid
show_status yes Show the Active / Ended badge
show_votes yes Show the vote count
show_date yes Show when the poll was published
[wbpoll_list count="6" columns="2" orderby="votes"]

In the block editor, add WB Poll to show one poll, or WB Poll List to show the poll grid. WB Poll List offers the [wbpoll_list] options in its block settings, except ids and author.

WB Poll has a Show poll title switch in its block settings, on by default. Turn it off when the block sits in a widget area or section that already shows its own title, so the title does not appear twice.

Location Works
Posts and pages Yes
Text widgets Yes
Page builders (Elementor, Beaver Builder) Yes
BBPress forums (with BuddyBoss) Yes
Theme template files Yes, use do_shortcode()
<?php echo do_shortcode( '[wbpoll id="36"]' ); ?>
  1. Add a Text widget to your sidebar
  2. Paste the shortcode
  3. Click Save
What do you think of the new feature?
[wbpoll id="42"]
Welcome to our community polls!
[wbpoll_create title="Create Your Poll"]
Recent Polls:
[wbpoll id="40,41,42"]
[wbpoll id="10,11,12"]
[bp_polls activity_id="123"]
[wbpoll id="36"]
[wbpoll id="36,37,38"]
[wbpoll_create]
[wbpoll_create title="Your Poll" redirect="/thank-you/"]
[wbpoll_list columns="2" count="6"]