Democracy Poll
Add to ListThis plugin provides an intuitive and powerful system for creating polls, with features such as:
- Customizable single-choice and multiple-choice voting
- Optional custom answers submitted by visitors
- Poll end dates
- Optional restriction of voting to registered users
- Multiple poll designs
- And more — see the changelog for details
Democracy Poll is compatible with major cache plugins, including W3 Total Cache, WP Super Cache, Wordfence, Quick Cache, and others.
Designed for ease of use and performance, it offers:
- A “Quick Edit” button for admins, shown directly above a poll
- A plugin menu in the admin toolbar
- Inline poll CSS
- Conditional JavaScript loading only when a poll is rendered
- And more — check the changelog for details
More Info
Democracy Poll is a modern version of the original, well-regarded plugin by the same name. Andrew Sutherland introduced the original plugin in 2006, including the innovative ability for visitors to add their own answers. This version retains the name and core idea but has been completely rewritten.
Key features:
- Create new polls
- Cache plugin compatibility (e.g. W3 Total Cache, WP Super Cache)
- Allow visitors to add their own answers
- Multiple-choice voting support
- Automatic poll closing after a specified end date
- Display random polls
- Restrict voting to registered users (optional)
- Quick poll editing for administrators
- Edit vote counts
- Allow users to change their votes
- Voter tracking via IP address, cookies, or WordPress user ID, with optional vote clearing
- Embed polls in posts via
[democracy]shortcode (visual editor button available) - Widget support (optional)
- Admin bar menu for easy access (optional)
- Load front-end assets only when a poll is rendered
- Add custom notes under polls
- Customize designs via CSS themes
Multisite support has been available since version 5.2.4.
Usage
Widget
- Go to
WP Admin Appearance Widgetsand add theDemocracy Pollwidget - Place it in a sidebar
- Configure settings
- Done
Template Code
In your theme file (e.g. sidebar.php), add:
<?php if ( function_exists( 'democracy_poll' ) ) { ?>
<div class="sidebar-section">
<h2>Polls</h2>
<div class="my-poll">
<?php democracy_poll(); ?>
</div>
</div>
<?php } ?>
- To show a specific poll:
<?php democracy_poll( 3 ); ?>(replace3with your poll ID) - To embed a specific poll in a post, use
[democracy id="2"]shortcode. - To embed a random poll in a post, use
[democracy]shortcode.
Poll Archive
To show the poll archive:
<?php democracy_archives( $hide_active, $before_title, $after_title ); ?>
Backward Compatibility Notes
6.1.0
- CHG: Removed the
DEM_VERconstant; useDemocracyPollplugin()->verinstead. - CHG: Removed the
DEMOC_URLconstant; useDemocracyPollplugin()->urlinstead. Note that the trailing slash was removed. - CHG: Removed the
DEMOC_PATHconstant; useDemocracyPollplugin()->dirinstead. Note that the trailing slash was removed. - CHG: Removed the
DEMOC_MAIN_FILEconstant. - CHG: Significantly refactored the
DemPollclass. Some properties moved to thePoll_RendererandPoll_Serviceclasses.
6.0.4
- Requires PHP 7.4+
6.0.0
- Requires PHP 7.0+
- If you used plugin classes directly in your code, you may need to update them to match the new class names