DynaPoll Wordpress Plugin

If you run a WordPress site and you would like to host one of your polls or any poll from DynaPoll on your site then this is the plugin for you!

It's extremely easy to install and even easier to use this plugin. All the information you require can be found below. You can also check out the following video which demonstrates the use of the plugin.

Download and Install

We recommend that you grab the WordPress plugin from Wordpress itself. Follow these instructions to get it from WordPress.

  1. Login to your WordPress admin console
  2. Click on the Plugins button on the left hand side of the admin console
  3. Click "Add New" next to the Manage Plugins title at the top of the page
  4. Enter "DynaPoll" in the search field making sure that "Term" is selected
  5. The DynaPoll plugin will be shown in the results. Click on "Install" on the right hand side.
  6. Once installed Activate the plugin. See instructions on how to use the plugin further below

If you would like to download and install the plugin manually then please follow these steps:

  1. Download the latest DynaPoll plugin package.
  2. Unzip the contents into a folder called "dynapoll"
  3. Copy this "dynapoll" folder into your "/wp-content/plugins" folder
  4. Login to your Wordpress admin console and go to the Plugins folder and Activate the plugin.

How to use the DynaPoll WordPress Plugin

It's really easy to use the plugin. Before you can though you need to know the Poll Code for the poll you wish to display. You can grab your poll code from the Vote URL of the poll. Whereever there is a link to the poll on this site, whether it is in your My Polls page, in the Poll Browser or anywhere else, you can see the URL for the poll by either clicking on the question or right clicking on the question and choosing the option to "Copy Link Address". The code is the last parameter of the vote URL which looks like this:

http://www.dynapoll.net/survey/vote/1gQXDBnMx3CDppWbaLDH4

The URL above is for the What is your favourite colour? poll and the poll code for this is: 1gQXDBnMx3CDppWbaLDH4

There are currently two themes available for the polls. These themes change the colour scheme slightly so that the poll displays better. You are most welcome to also edit the CSS as you see fit however the two themes that are available are:

  • Dark - using "dark" as your theme value will make the polls (hopefully!) look good on dark backgrounds.
  • Light - using "light" as your theme value will make the polls look better on light backgrounds.

There are several ways you can embed a DynaPoll into your Wordpress site:

1. In your Blog Posts or Page content put the following tag where you would like the poll to appear:

[dynapoll: 1gQXDBnMx3CDppWbaLDH4, theme]

2. Anywhere in the WordPress Template put the following code:

<?php
$poll_code = '1gQXDBnMx3CDppWbaLDH4';
$theme = 'light';
echo dynapoll_get_poll($poll_code, $theme);
?>

3. If you want to use it in a Dynamic Sidebar with a Widget we recommend downloading the PHP Code Widget by Otto. Drag the PHP Code Widget into your sidebar and paste the following code into the content of the Widget:

<?php
$poll_code = '1gQXDBnMx3CDppWbaLDH4';
$theme = 'dark';
echo dynapoll_get_poll($poll_code, $theme);
?>

**NEW FEATURES**

Using very similar methods to above you can also now use a different call to grab a random poll that you have created back at DynaPoll. For this you will need to know your User Code. The User code will be shown on your "My DynaPoll" page (right hand side bottom of the user menu - for now!).

It's almost the same process as above but to be clear this is how it's done. For the below example the user code is "98QXDBnMGGCDpFFaLD89".

1. In your Blog Posts or Page content put the following tag where you would like the random poll to appear:

[dynapoll_random: 1gQXDBnMx3CDppWbaLDH4, theme]

2. Anywhere in the WordPress Template put the following code:

<?php
$user_code = '98QXDBnMGGCDpFFaLD89';
$theme = 'light';
echo dynapoll_get_random_poll($user_code, $theme);
?>

3. If you want to use it in a Dynamic Sidebar with a Widget we recommend downloading the PHP Code Widget by Otto. Drag the PHP Code Widget into your sidebar and paste the following code into the content of the Widget:

<?php
$user_code = '98QXDBnMGGCDpFFaLD89';
$theme = 'dark';
echo dynapoll_get_random_poll($user_code, $theme);
?>

Revision History

The following are the release dates and changes for this plugin.

  • 1.0 10 April 2010: Initial Release
  • 1.0.1 13 April 2010: Fixed some CSS image file reference problems. Mostly cosmetic.
  • 1.0.3 22 April 2010: Created the themes light and dark to help the polls present better on different backgrounds. Also at this time DynaPoll began offering "traditional" static polls with finite choices.
  • 1.0.4 (Current) 15 May 2010: We had to make some changes to the HTML structure and the CSS to improve the look of the poll. We are already pushing through the changes to your polls with your current version but with the overhead of extra inline CSS. It is recommended to upgrade the plugin which will remove this inline CSS.
    We didn't want to do a new release just for the above so we have also added the new feature for displaying a random poll for a particular user code. Check out the instructions for more details. You can now have a different poll appear each time the page is refreshed (if you have more than one poll of course!).