Widgets Guide

Get Started

WB Polls includes two widgets for displaying poll results in sidebars and widget areas. Show real-time voting data with visual progress bars to keep your community engaged with active polls.

Available Widgets

WidgetPurposePoll Type
(BuddyPress) Poll GraphActivity poll resultsBuddyPress Activity Polls
WB Poll ReportStandalone poll resultsStandalone Polls

(BuddyPress) Poll Graph Widget

Display results from BuddyPress activity polls with interactive progress bars and a poll selector dropdown.

Requirements

  • BuddyPress must be active
  • User must be logged in to view the widget
  • At least one activity poll must exist

Adding the Widget

  1. Navigate to Appearance > Widgets
  2. Find “(BuddyPress) Poll Graph” in the available widgets
  3. Drag it to your preferred sidebar or widget area
  4. Configure the settings
  5. Click Save

Widget Settings

SettingDescriptionDefault
TitleWidget heading displayed above results“Poll Graph”
Max polls to showNumber of polls in the dropdown selector (1-20)5
Default pollWhich poll loads when the widget first appearsFirst available

What It Displays

Poll Selector: A dropdown menu showing available activity polls by title. The widget loads new results automatically when you change the selection.

For Each Poll Option: The option text, vote percentage, vote count, and an animated progress bar with color coding.

Additional Features: Total vote count at the bottom, CSV export button for administrators, and a loading spinner during AJAX updates.

Progress Bar Colors

The widget cycles through eight distinct colors for visual distinction: blue, green, amber, red, purple, pink, cyan, and lime.

User Access

User TypeWhat They See
Logged-out visitorsWidget is hidden
Regular usersTheir own polls and public polls
AdministratorsAll activity polls

CSV Export

Administrators see an “Export CSV” button that downloads poll data including the poll question, all options with vote counts, voter information, and timestamps.

WB Poll Report Widget

Display results from standalone polls with support for single poll or all-polls display modes.

Requirements

  • At least one published standalone poll must exist
  • Works for all visitors including logged-out users

Adding the Widget

  1. Navigate to Appearance > Widgets
  2. Find “WB Poll Report” in the available widgets
  3. Drag it to your preferred sidebar or widget area
  4. Configure the settings
  5. Click Save

Widget Settings

SettingDescriptionOptions
TitleWidget headingDefault: “Poll Results”
Display TypeHow polls are shownAll Polls or Single Poll
Select PollWhich poll to display (single mode only)Dropdown of published polls

Display Modes

All Polls Mode (Default): Shows a dropdown with all polls that have received votes. Users can switch between polls, and results update dynamically via AJAX. Use this for sites with multiple active polls.

Single Poll Mode: Displays one specific poll without a dropdown selector. Best for focused campaigns or featured polls.

What It Displays

Each poll shows its title and total vote count at the top. For each option, the widget displays the option text, vote percentage, vote count, and a colored progress bar.

If no published polls exist, the widget shows “No polls found.” If a selected poll has no votes yet, it shows “No votes yet.”

Progress Bar Colors

Uses the same eight-color rotation as the Activity Poll Graph widget: blue, green, amber, red, purple, pink, cyan, and lime.

User Access

User TypeWhat They See
Guest visitorsPublished poll results
Logged-in usersPublished poll results
AdministratorsPublished poll results

WB Polls Sidebar

WB Polls registers a custom sidebar called “WB Polls Sidebar” that appears on single poll pages and the poll archive. You can add widgets to this area to complement poll content.

Widget Placement Ideas

Homepage Poll Highlight

Feature your most important poll on the homepage sidebar:

  1. Add the “WB Poll Report” widget
  2. Set Display Type to “Single Poll”
  3. Select your featured poll
  4. Set the title to “Vote Now!”

Activity Feed Companion

Show recent poll results alongside the BuddyPress activity stream:

  1. Add the “(BuddyPress) Poll Graph” widget
  2. Set Max polls to 3
  3. Set the title to “Recent Poll Results”
  4. Place in the activity page sidebar

Multiple Poll Dashboard

Let users browse all active polls from the sidebar:

  1. Add the “WB Poll Report” widget
  2. Set Display Type to “All Polls”
  3. Set the title to “Community Polls”

Widget Comparison

FeatureActivity Poll GraphWB Poll Report
Poll TypeBuddyPress ActivityStandalone
Login RequiredYesNo
Guest AccessNoYes
Display ModesSingle with dropdownSingle or All Polls
Export FeatureYes (admin only)No
Max Polls SettingYes (1-20)No
Real-time UpdatesYes (AJAX)Yes (AJAX)

Styling Widgets

CSS Classes

Both widgets use consistent CSS classes for customization:

.wb-poll-widget { }              /* Widget container */
.wb-poll-widget select { }       /* Poll selector dropdown */
.wb-poll-results { }             /* Results container */
.wb-poll-option { }              /* Individual option row */
.wb-poll-bar-container { }       /* Progress bar container */
.wb-poll-bar { }                 /* Filled progress bar */
.wb-poll-votes { }               /* Vote text (percentage and count) */

Customizing Progress Bar Colors

Override the default colors in your theme CSS:

.wb-poll-bar:nth-child(1) { background-color: #your-color; }
.wb-poll-bar:nth-child(2) { background-color: #your-color; }

Responsive Behavior

Both widgets are fully responsive. Progress bars scale to the container width, text wraps appropriately, and the dropdown fills the available width on mobile devices.

Last updated: February 14, 2026