Last Updated on October 27, 2013
Better WordPress Polldaddy Polls
Helps you add Polldaddy Polls to your WordPress website easily. This plugin focuses on the front end, i.e. you edit your polls on polldaddy.com and you choose how to show them on your website.
Sponsor Gazette by WooThemes - A fast magazine style theme for news websites!
Who doesn’t need a poll these days on a website/blog? It might make your visitors interact more and keep them interested. And if you are going to choose a poll platform for a WordPress installation, look no further than Polldaddy — “the most powerful and easy to use” poll software around.
While this plugin isn’t as comprehensive as the original Automattic plugin PollDaddy Polls & Ratings, it does allow you to customizably show your polls to your visitors (yes, only polls). Below are some great features BWP Polldaddy offers you:
- Simple, lightweight and easy to use
- Allows you to update your polls manually or automatically using a configurable time settings
- Offers SSL support for paid Polldaddy accounts
- Template functions ready
- Allows you to show polls based on their IDs, their creation date or their numbers of responses, and you can also sort polls the way you want
- WordPress Multi-site compatible (not tested with WPMU)
To actually make use of this plugin you will need an API key that can be registered for free here: http://polldaddy.com/register/. After you have typed in your API key and press ‘Save Changes’, the plugin will try to get your UserCode (i.e. some kind of ID used to identified you) and if it succeeds, you will see your UserCode appear right away. If for some reasons some errors pop up you might want to re-check your API key and/or your SSL settings (SSL is only available to paid Polldaddy users, for your information).
You can choose between automatic or manual update mode. If you want your polls to be updated automatically (the default behaviour) you should also set an appropriate time period indicating when the next update should be carried out. When the automatic update is on, clicking on the manual update button will have no effect, so please keep that in mind.
Another thing that might worth mentioning is requesting data from Polldaddy’s API servers can be slow (with a timeout of 3 seconds). It is therefore recommended that you set the time period mentioned above to something appropriate. If you rarely update your polls, just disable the automatic update and click the manual update button any time you edit your polls. Also note that automatic update will be carried out when you’re visiting any page on your website/blog as an admin only, this is to make sure that the slowdown caused by Polldaddy’s API servers will not affect your visitors.
Show polls to your visitors
Despite the fact that there are three methods that you can use to show polls to your visitors, the only things you would need to care about are those parameters:
- 'id' // a specific poll ID that you want to show
- 'limit' // the maximum number of polls to show, 0 means no limit
- 'orderby' // there are four values you can choose: created, responses, id or rand (i.e. random)
- 'order' // 'desc' to order descendingly and 'asc' for the opposite
'id' // a specific poll ID that you want to show 'limit' // the maximum number of polls to show, 0 means no limit 'orderby' // there are four values you can choose: created, responses, id or rand (i.e. random) 'order' // 'desc' to order descendingly and 'asc' for the opposite
Apply those parameters to any method and you will get:
[bwpdaddy orderby='rand' limit='1']
If you hate the shortcode’s name (ugh, I’m sorry…), you can change it to different names using this filter:
bwp_polldaddy_shortcode_tag. Just make sure you return a string representing the name you desire.
A picture is worth a thousand words, eh?
Using template functions
To show just one poll using its ID, use:
and if you want to show polls like the above widget, use:
- // structure: bwp_get_polls($limit, $orderby, $order);
- bwp_get_polls(1, 'rand');
<?php // structure: bwp_get_polls($limit, $orderby, $order); bwp_get_polls(1, 'rand'); ?>
That’s all you need to know if you want to use this plugin, very simple I must say (sorry if you expect a more complicated guide =P). Enjoy!
- (This section is open for feature request)
This plugin is licensed under GPL version 3, and it needs contributions from the community.
Buy me some special coffees!
My plugins and support for them are free. If you like my work and could buy me some (special) coffees, I would be much appreciated! They might help with some overnight times debugging my plugins, you know.
Support, Feedback, and Code Improvement
- Please report bugs to the BWP Community.
- WordPress Plugin Repository: http://wordpress.org/extend/plugins/bwp-polldaddy/ (please vote for this plugin if you like it, thank you!)
i18n (Translate the plugin)
If you are a translator, please help translating this plugin. Even if you aren't, you can become one, it is very easy and fun! If you want to know how, please read here: Create a .pot or .po File using Poedit.