Title: Random poll
Last modified: September 14, 2017

---

# Random poll

 *  Resolved [regme](https://wordpress.org/support/users/regme/)
 * (@regme)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/random-poll-2/)
 * My aim is to make rand polls for each category.
    I can do it with if-else and
   getting category ID. Then I need to insert poll without widget. How I can random
   for only separate polls? for exampple, fom IDs: 3,10,50&

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

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/random-poll-2/#post-9497184)
 *     ```
       $poll_ids = [ 1, 10, 50 ];
       get_poll( (int) array_rand( $poll_ids ) );
       ```
   
 * ?
    -  This reply was modified 8 years, 8 months ago by [Lester Chan](https://wordpress.org/support/users/gamerz/).
 *  Thread Starter [regme](https://wordpress.org/support/users/regme/)
 * (@regme)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/random-poll-2/#post-9509821)
 * Thank you Chan. Very easy and correct desicion

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

The topic ‘Random poll’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [regme](https://wordpress.org/support/users/regme/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/random-poll-2/#post-9509821)
 * Status: resolved