The Raffle Ticket Generator offers two options for selecting a winner in your raffle. You can either use the random drawing feature in the WordPress admin panel or the Live Drawing Shortcode option on a WordPress page. Both methods ensure fairness by shuffling all the tickets entered into the raffle category and randomly selecting a winner or winners.
If you’re interested in learning more about the randomness testing involved, you can refer to an article that provides a summary of the process: https://online.wpraffle.com/live-drawing-stats/
As with any plugin, we highly recommend thoroughly testing and conducting “dry runs” to ensure that everything is properly configured and functioning as expected. Many of our customers find it beneficial to perform multiple drawings, noting the selections made, and then clearing the table to demonstrate transparency in the winner selection process. This allows for auditing and instills confidence in the fairness of the selection.
Wp-admin Backend Drawing: #
To do a backend drawing – simply select the raffle from the Select a Raffle to Pick Winner section.
This will display the number of tickets that have been created and are entered in this raffle category. To begin the random selection, simply click start. This will start cycling through orders and tickets randomly. Tickets that are entered into the drawing are selected at random and displayed on the screen in random order. When you are ready to pick the winner, simply click stop and the random selection will be displayed.
To add the winner to the Winner Table and save it, simply click “Add this winner to the winner table” This is for record keeping and also to allow you to select multiple winners. If you do not add it to the winner table, it is not saved. Many of our large raffle prizes have strict guidelines and they need to select a First Runner Up or Second Runner Up in case the winner is ineligible. This also allows for a Grand Prize, First Prize, Second Prize, etc. for multi-prize raffles.
Some of our customers who have auditors monitoring the winner selection, may do this several times to note the randomness of the winner selection. For instance, they may do this 20 times noting each winner, then say, this is now the official winner and do it that time and save to the table.
Live Drawing for Front End Drawings: #
To do a live drawing on the website, you will need the shortcode reference for the raffle. This is on the Select Winners page. This shortcode is only Supported on a WordPress Page, not a Post. Currently we support one raffle winner shortcode per WordPress page.
In this example it displays the name of the raffle (Raffle with ticket images) and then the information for the Shortcode:
When you click Generate Shortcode it will create the shortcode and display in a pop up. You can copy and paste it from there.
The settings shown above generate this code:
[winnerpage catid=”21″ numberofwinners=”2″ winnertype1=”Grand Prize Winner” winnertype2=”Winner2″ time=”30″ format=”s” textstart=”Winner Selection has started” textend=”Winner Selection is complete”]
**DO NOT CUT AND PASTE THE SHORTCODE FROM ABOVE! WordPress may change the ” above and the code may not be the same. Copy the code from the admin page in the plugin on your website. We strongly recommend using text editor mode to paste the shortcodes. Many WYSIWYG editors visual mode will mess up shortcodes.
NOTE – The shortcode will not display ANYTHING if there are no tickets sold. There must be tickets in the tickets table for that raffle category to display the countdown timer.
**GUTENBERG USERS – #
Gutenberg is not the friendliest with shortcodes. If you have problems, we suggest using a plugin called “disable gutenberg” and using the classic editor to save your page for the live drawing on that particular page.
**PAGE BUILDER USERS – #
Like Gutenberg, most pagebuilder and wsyiwyg editors add a lot of extraneous code to the page. As we state prior to purchasing, we expect basic web developer skills. If you have issues with the shortcode displaying, you should use the text editor and do a simple page, test it, then add all the other content.
Shortcode Usage – #
The Shortcode is what you will need to put on a WordPress page. Here are the meaning behind the various attributes:
- catid=”x” This is the WooCommerce product category id. We show this for each raffle to make it easy for you to simply cut and paste into the wordpress page.
- numberofwinners=”x” This is the number of winners to display. Default is 1 and you can have up to 10 winners.
- winnertype(1-10)=”alpha-numeric” This is the prize or designation of the winner. Examples are Grand Prize Winner, First Alternate, Runner Up, etc. Simply replace the text within the quotes for this display.
- time=”xx” This is the number of seconds to display the random cycling of tickets prior to picking the winner. Default is 45 seconds. That will give a good sampling of random tickets to help show that the drawing is random.
- format=”s” This is for seconds. Other options are “m”, although rarely used. Unless you have millions of tickets, it does not make sense to have a cycle time longer than about 45 seconds.
- textstart=”Winner Selection is started” This the text header that displays above the random cycling of tickets when the tickets are being cycled.
- textend=”Winner Selection Is Over” This is the text header that displays when the winner(s) have been chosen.
Selected Date Range Winner Shortcode (Gold,Platinum): #
The Gold and Platinum editions also have the ability to do winner selection by date range. This is useful for interim drawings for promotions where people who purchase tickets during the weekend are also entered into a raffle for an additional prize. Simply select Ranged from the Shortcode Type dropdown and then add the date and time.
Raffle Winner Shortcode Page Settings: #
To use the shortcode, create a WordPress page and add the shortcode in the text editor. This shortcode only works on a WordPress PAGE. It is not compatible with a POST
Below the text editor is a date field for Automatic Winner Setting for RTG. Use the calendar widget and select the time you want to being the drawing. The time operates on the WordPress time zone, BUT we have seen instances on various hosts, where the WordPress time is not getting set and the time is actually UTC. Test the time to make sure the time is what you want. When the time is set and shortcode is entered – this is what you will see. When the timer ends – it will begin to cycle through random tickets that are entered and randomly display tickets for the amount of time you have set in the “time” parameter” and then randomly select the winner(s).
Test the live drawing! #
We cannot stress this enough. Especially since all the changes in WordPress 5.6 with how jquery is processed. Do several tests PRIOR to going live. You can delete the test winners from the winners table in the Raffles Winners page. Many things can conflict in a theme. We see many storebought themes that have maintenance counters in them that do not close the script in their code. If you see NNN NNN NNN on the page with the shortcode, you did not set the time and date as noted above.