Codex / mycred/game / Shortcodes / mycred_lottery_results


This shortcode allows you to so the results of a myCRED lottery. If you have more then one lotteries then you can use this shortcode multiple times as long as each one is set to show a unique lottery.

Requires the Lottery add-on to be installed and enabled.

Available since version 1.2

Shortcode Attributes

Attribute Type Required Default Description
id int Yes - The lottery ID to show.
user_row string No %display_name% The row template to use when showing each winner. Accepts general template tags and user related template tags.
order string No DESC The order of the draw history. Accepts either DESC for descending or ASC for ascending order.
number int No -1 Number of past draws to show. Use -1 to show all.
draw_id int No - Option to show the winners of a particular draw. Should not be used if showing all draws.

CSS Styling

// Wrapper
div.mycred-lotto-results { }


Example 1: Return the results for the lottery that has the ID 4.

[mycred_lottery_results id=4]

Last edited June 23, 2016