Title: Gallery Polls?
Last modified: August 20, 2016

---

# Gallery Polls?

 *  Resolved [telittleone](https://wordpress.org/support/users/telittleone/)
 * (@telittleone)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/gallery-polls/)
 * Hey there! I was wondering if there was any plugin that could create a gallery
   for both polls and images, such that when the user advances, it causes both the
   current image and a poll displayed in the sidebar to change. I wouldn’t mind 
   if there’s some tinkering involved to get that to work, since I have some basic
   knowledge of PHP.
 * Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [telittleone](https://wordpress.org/support/users/telittleone/)
 * (@telittleone)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/gallery-polls/#post-2789195)
 * Nevermind. I got it working.
    My hack requires the following plugins: WP PHP 
   widget: [http://wordpress.org/extend/plugins/wp-php-widget/](http://wordpress.org/extend/plugins/wp-php-widget/)
   WP-Polls: [http://wordpress.org/extend/plugins/wp-polls/](http://wordpress.org/extend/plugins/wp-polls/)
   and NextGEN Gallery: [http://wordpress.org/extend/plugins/nextgen-gallery/](http://wordpress.org/extend/plugins/nextgen-gallery/)
 * Install and activate all three plugins. Each poll must have the same id as a 
   corresponding image.
 * Then, add a widget using “WP PHP widget” and paste in the following code:
 *     ```
       <?php $pid = $_GET['pid']; ?>
       <?php if($pid == '') $pid = '1'; ?>
       <?php if (function_exists('vote_poll') && !in_pollarchive()): ?>
           <li>
               <h3 style="text-align:center;">Polls</h3>
               <ul>
                   <li><?php get_poll($pid);?></li>
               </ul>
               <?php display_polls_archive_link(); ?>
           </li>
       <?php endif; ?>
       ```
   
 *  Thread Starter [telittleone](https://wordpress.org/support/users/telittleone/)
 * (@telittleone)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/gallery-polls/#post-2789196)
 * Resolved. Sorry for the double post.
 * [EDIT]
    Actually, triple post 😐

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Gallery Polls?’ is closed to new replies.

 * 2 replies
 * 1 participant
 * Last reply from: [telittleone](https://wordpress.org/support/users/telittleone/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/gallery-polls/#post-2789196)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
