Title: new shortcode [poll=&quot;id&quot;] don&#039;t work
Last modified: August 21, 2016

---

# new shortcode [poll="id"] don't work

 *  Resolved [tz-ua](https://wordpress.org/support/users/tz-ua/)
 * (@tz-ua)
 * [12 years ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/)
 * New shortcode doesn’t process properly, so it always shows the latest poll.
    
   The function for processing it hadn’t changed since last plugin update, so I 
   made quick draft fixes to solve this situation untill plugin developers won’t
   fix it. wp-polls.php (line 735)
 *     ```
       function poll_shortcode($atts) {
       	extract(shortcode_atts(array('id' => 0, 'type' => 'vote'), $atts));
       	if(!is_feed()) {
       		$id = intval($id);
       		/**/
       		$id_new = intval(trim($atts[0], '="\''));
       		if(!$id)
       			$id = $id_new;
       		/**/
       		if($type == 'vote') {
       			return get_poll($id, false);
       		} elseif($type == 'result') {
       			return display_pollresult($id);
       		}
       	} else {
       		return __('Note: There is a poll embedded within this post, please visit the site to participate in this post\'s poll.', 'wp-polls');
       	}
       }
       ```
   
 * [https://wordpress.org/plugins/wp-polls/](https://wordpress.org/plugins/wp-polls/)

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

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [12 years ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839446)
 * Yes, [poll=1] was used long time back (and in 3.9, they remove support for it–
   i think)
 * But going forward, it will be [poll id=”1″] as mentioned in the docs [https://wordpress.org/plugins/wp-polls/installation/](https://wordpress.org/plugins/wp-polls/installation/).
   It is the proper way of doing it.
 * There is still a bug that I forgot to fix which is the Poll button on the editor
   still inserts [poll=1], that bug has already fixed in the dev version [https://github.com/lesterchan/wp-polls/archive/master.zip](https://github.com/lesterchan/wp-polls/archive/master.zip)
   to change to [poll id=”1″]
 *  [martin.krcho](https://wordpress.org/support/users/martinkrcho/)
 * (@martinkrcho)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839696)
 * Hi Lester, would it be possible to include the fix suggested above in the latest
   version of the plugin? You have changed the way the editor button inserts the
   shortcode, but this doesn’t solve problem with older occurencies of the shortcode.
   Thanks.
 *  [Belladore](https://wordpress.org/support/users/sweet_baby_girl/)
 * (@sweet_baby_girl)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839700)
 * I have the same problem. The new posts display only latest polls not the poll
   I inserted in the post.
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839701)
 * Okie I will make the fix to the core =)
 *  [Belladore](https://wordpress.org/support/users/sweet_baby_girl/)
 * (@sweet_baby_girl)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839702)
 * I hope it’s coming soon, because I had to disable my plugin and all my polls 
   are now disappeared. 🙁
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839703)
 * You can use the dev version [https://github.com/lesterchan/wp-polls/archive/master.zip](https://github.com/lesterchan/wp-polls/archive/master.zip)
 *  [Belladore](https://wordpress.org/support/users/sweet_baby_girl/)
 * (@sweet_baby_girl)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839704)
 * Thank you! It helped a lot!
 *  [martin.krcho](https://wordpress.org/support/users/martinkrcho/)
 * (@martinkrcho)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839705)
 * Thanks, Lester. When are you planning to release the new version?
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839706)
 * No time frame yet. I will wait for a few more bugs report if there is any

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

The topic ‘new shortcode [poll="id"] don't work’ is closed to new replies.

 * ![](https://ps.w.org/wp-polls/assets/icon.svg?rev=977996)
 * [WP-Polls](https://wordpress.org/plugins/wp-polls/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-polls/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-polls/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-polls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-polls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-polls/reviews/)

## Tags

 * [id](https://wordpress.org/support/topic-tag/id/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 9 replies
 * 4 participants
 * Last reply from: [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/new-shortcode-pollid-dont-work/#post-4839706)
 * Status: resolved