mycred_lotteries

Codex / mycred/game / Shortcodes / mycred_lotteries

Description

This shortcode allows you to list all published myCRED Lotteries. You can select to show all or a specific number of lotteries if you run more then one.

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

Available since version 1.0

Shortcode Attributes

Attribute Type Required Default Description
number int No -1 Number of lotteries to show. Use -1 to show all published lotteries.
status string No publish The status of the lotteries to show.
show_title int No 1 Option to show the title for each lottery (1) or hide the title (0).
nothing string No There are no active lotteries at this time The message to show users when no active lotteries exists.

CSS Styling

// Wrapper
div#myCRED-all-lotteries { }

// Lottery loop
div.mycred-lottery { }

// Title (if shown)
h2.lottery-title { }

Examples

Example 1: Show last 2 lotteries.

[mycred_lotteries number=2]

Example 1: Show only private lotteries without a title.

[mycred_lotteries status="private" show_title=0]

Last edited June 23, 2016