Widgets Guide
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
Section titled “Available Widgets”| Widget | Purpose | Poll Type |
|---|---|---|
| (BuddyPress) Poll Graph | Activity poll results | BuddyPress Activity Polls |
| WB Poll Report | Standalone poll results | Standalone Polls |
(BuddyPress) Poll Graph Widget
Section titled “(BuddyPress) Poll Graph Widget”
Display results from BuddyPress activity polls with interactive progress bars and a poll selector dropdown.
Requirements
Section titled “Requirements”- BuddyPress must be active
- User must be logged in to view the widget
- At least one activity poll must exist
Adding the Widget
Section titled “Adding the Widget”- Navigate to Appearance > Widgets
- Find “(BuddyPress) Poll Graph” in the available widgets
- Drag it to your preferred sidebar or widget area
- Configure the settings
- Click Save
Widget Settings
Section titled “Widget Settings”| Setting | Description | Default |
|---|---|---|
| Title | Widget heading, shown in your theme’s widget title style | “Poll Graph” |
| Max polls to show | Number of polls in the dropdown selector (1-20) | 5 |
| Default poll | Which poll loads when the widget first appears | First available |
What It Displays
Section titled “What It Displays”Poll Selector: A dropdown menu showing available activity polls by title. Long titles are shortened in the list; hover an entry to read the full 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.
Additional Features: Total vote count, a CSV export button for the poll’s author, site admins and moderators, and a loading spinner during AJAX updates.
If no polls exist yet, the widget shows “No polls created yet.”
Progress Bar Colors
Section titled “Progress Bar Colors”Progress bars use your theme’s primary color, in light and dark mode.
User Access
Section titled “User Access”| User Type | What They See |
|---|---|
| Logged-out visitors | Widget is hidden |
| Regular users | Their own polls and public polls |
| Administrators | All activity polls |
CSV Export
Section titled “CSV Export”The poll’s author, site admins and BuddyPress moderators see an “Export CSV” button. The file has one row per voter with the user ID, user name, vote date and a column for each option marking the voter’s choice. See Group Polls and Export.
WB Poll Report Widget
Section titled “WB Poll Report Widget”Display results from standalone polls with support for single poll or all-polls display modes.
Requirements
Section titled “Requirements”- At least one published standalone poll must exist
- Works for all visitors including logged-out users
Adding the Widget
Section titled “Adding the Widget”- Navigate to Appearance > Widgets
- Find “WB Poll Report” in the available widgets
- Drag it to your preferred sidebar or widget area
- Configure the settings
- Click Save
Widget Settings
Section titled “Widget Settings”| Setting | Description | Options |
|---|---|---|
| Title | Widget heading, shown in your theme’s widget title style | Default: “Poll Results” |
| Display Type | How polls are shown | All Polls or Single Poll |
| Select Poll | Which poll to display (single mode only) | Dropdown of published polls |
Display Modes
Section titled “Display Modes”All Polls Mode (Default): Shows a dropdown of your most recent published polls (up to 200). 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
Section titled “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 progress bar. In the poll dropdown, long titles are shortened; hover an entry to read the full title.
If no published polls exist, the widget shows “No polls available.”
Who Sees the Results
Section titled “Who Sees the Results”The widget follows the same result rules as the poll page:
- With Hide Results Until Voted on, members who have not voted and logged-out visitors see “Results are hidden for now. Vote on the poll or check back after it closes.” instead of the counts.
- With Hide results until the poll ends on for a poll, its results appear once the poll ends.
- Site admins and the poll’s author always see the results.
Progress Bar Colors
Section titled “Progress Bar Colors”Uses your theme’s primary color, the same as the Activity Poll Graph widget.
User Access
Section titled “User Access”| User Type | What They See |
|---|---|
| Guest visitors | Published poll results |
| Logged-in users | Published poll results |
| Administrators | Published poll results |
WB Polls Sidebar
Section titled “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
Section titled “Widget Placement Ideas”Homepage Poll Highlight
Section titled “Homepage Poll Highlight”Feature your most important poll on the homepage sidebar:
- Add the “WB Poll Report” widget
- Set Display Type to “Single Poll”
- Select your featured poll
- Set the title to “Vote Now!”
Activity Feed Companion
Section titled “Activity Feed Companion”Show recent poll results alongside the BuddyPress activity stream:
- Add the “(BuddyPress) Poll Graph” widget
- Set Max polls to 3
- Set the title to “Recent Poll Results”
- Place in the activity page sidebar
Multiple Poll Dashboard
Section titled “Multiple Poll Dashboard”Let users browse all active polls from the sidebar:
- Add the “WB Poll Report” widget
- Set Display Type to “All Polls”
- Set the title to “Community Polls”
Widget Comparison
Section titled “Widget Comparison”| Feature | Activity Poll Graph | WB Poll Report |
|---|---|---|
| Poll Type | BuddyPress Activity | Standalone |
| Login Required | Yes | No |
| Guest Access | No | Yes |
| Display Modes | Single with dropdown | Single or All Polls |
| Export Feature | Yes (poll author, admins, moderators) | No |
| Max Polls Setting | Yes (1-20) | No |
| Real-time Updates | Yes (AJAX) | Yes (AJAX) |
Styling Widgets
Section titled “Styling Widgets”CSS Classes
Section titled “CSS Classes”Both widgets sit inside your theme’s widget card and use its widget title, so they match the other widgets in the sidebar. Their own classes, for theme CSS:
.polls-widget { } /* Widget wrapper (on the theme's widget element) */.polls-widget__select { } /* Poll selector dropdown */.polls-widget__results { } /* Results container */.polls-widget__results-list { } /* List of options */.polls-widget__result-item { } /* Individual option row */.polls-widget__result-bar { } /* Progress bar track */.polls-widget__result-fill { } /* Filled progress bar */.polls-widget__empty-text { } /* Empty-state sentence */Customizing Progress Bar Colors
Section titled “Customizing Progress Bar Colors”Bars use the --polls-primary color token. Override it, or the fill itself, in your theme CSS:
.polls-widget__result-item:nth-child(2) .polls-widget__result-fill { background-color: var(--your-token); }Responsive Behavior
Section titled “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.

