Shortcodes
Shortcodes
Display raffle information anywhere on your site using shortcodes. Embed raffle cards, countdown timers, progress bars, and more in any page, post, or widget area.
Available shortcodes
| Shortcode | Description |
|---|---|
[raffle_card] | Full product card with image, countdown, prize, and CTA |
[raffle_cards] | Responsive multi-card grid |
[raffle_countdown] | Countdown timer |
[raffle_progress] | Ticket sales progress bar |
[raffle_prize] | Prize information display |
[raffle_status] | Status badge |
[raffle_winners] | Winner announcement banner with avatar, city, and prize details |
[raffle_wheel] | Interactive spin-to-win prize wheel (Pro addon) |
[raffle_reveal] | Dramatic winner reveal with confetti animations (Pro addon) |
[raffle_entries] | Public participant list with privacy controls (Pro addon) |
[raffle_card]
Displays a single raffle product card with image, countdown, prize details, and a "Buy Ticket" button.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID, latest, active | Auto-detect | Which raffle to show |
Examples
[raffle_card id="123"]
[raffle_card id="latest"]
[raffle_card id="active"]
Notes:
latestshows the most recently published raffle.activeshows the first currently active raffle.- If
idis omitted and the shortcode is inside a WooCommerce product loop, it auto-detects the current product.
[raffle_cards]
Displays multiple raffle cards in a responsive grid layout. Supports filtering by IDs, category, and status.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
ids | Comma-separated IDs | - | Specific raffle IDs to show |
category | Category slug(s) | - | Filter by product category |
status | active, ended, all | active | Filter by raffle status |
limit | 1–50 | 6 | Maximum cards to display |
columns | 1–4 | 3 | Number of grid columns |
orderby | date, price, title, random | date | Sort order |
order | ASC, DESC | DESC | Sort direction |
Examples
[raffle_cards status="active" limit="6" columns="3"]
[raffle_cards ids="123,456,789"]
[raffle_cards category="prizes" limit="4" columns="2"]
[raffle_cards status="all" orderby="random" limit="3"]
[raffle_cards status="ended" orderby="date" order="DESC"]
Notes:
- When
idsis provided, category and status filters are ignored. - If no matching raffles are found, a "No raffles found." message is displayed.
[raffle_countdown]
Displays a countdown timer for a specific raffle.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID, latest, active | Auto-detect | Which raffle |
format | compact, full | compact | Timer style |
Examples
[raffle_countdown id="123"]
[raffle_countdown id="active" format="full"]
[raffle_countdown id="latest" format="compact"]
Formats:
- compact: Inline badge showing remaining time (e.g., "2d 14h left").
- full: Detailed countdown with days, hours, minutes, and seconds.
[raffle_progress]
Displays a ticket sales progress bar showing tickets sold vs. available.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID, latest, active | Auto-detect | Which raffle |
Example
[raffle_progress id="123"]
Note: Only displays meaningful data when the raffle has a maximum ticket limit set.
[raffle_prize]
Displays prize information for a raffle, including all prize tiers when multiple winners are configured.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID, latest, active | Auto-detect | Which raffle |
Example
[raffle_prize id="123"]
[raffle_status]
Displays a status badge for a raffle.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID, latest, active | Auto-detect | Which raffle |
Example
[raffle_status id="123"]
Status labels
| Raffle State | Badge Label |
|---|---|
| Not yet started | Coming Soon |
| Currently active | Active |
| All tickets sold | Sold Out |
| Past end date | Ended |
| Winner drawn | Winner Selected |
[raffle_winners]
Displays the winner announcement banner for a raffle, including Gravatar, city, ticket number, draw date, and a link to the raffle product. Uses the same styling as the winner banner on the product page.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID, latest, active | Auto-detect | Which raffle |
show_avatar | true, false | true | Show winner's Gravatar |
show_city | true, false | true | Show winner's city (from billing data) |
show_ticket | true, false | true | Show winning ticket number |
show_date | true, false | true | Show draw date |
show_link | true, false | true | Show link to the raffle product |
limit | Number | 0 (all) | Max number of winners to display |
Examples
[raffle_winners id="123"]
[raffle_winners id="latest" show_avatar="true" show_city="true"]
[raffle_winners id="123" limit="3" show_link="false"]
[raffle_winners id="active" show_ticket="false" show_date="false"]
Notes:
- If the raffle has no winners yet, nothing is displayed (no empty state).
- If the raffle ID is invalid or the product is not a raffle, nothing is displayed.
- City is pulled from WooCommerce billing data. If no billing city is available, it is omitted.
- When
rfwc_mask_winner_namefilter is enabled (name privacy), city is automatically hidden. - Stores can disable city display globally using the
rfwc_show_winner_cityfilter (defaulttrue).
[raffle_wheel] (Pro addon)
Displays the Lucky Wheel / Spin to Win prize wheel for a raffle. Requires Raffle for WooCommerce Pro.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID | Required | Which raffle's wheel to display |
Example
[raffle_wheel id="123"]
Notes:
- The raffle must have the Lucky Wheel enabled in its product settings.
- Use this shortcode when the wheel's Display location is set to "Shortcode only", or to embed it on pages other than the product page.
- If the Pro addon is not active or the wheel is not configured, nothing is displayed.
- See the Lucky Wheel documentation for full configuration details.
[raffle_reveal] (Pro addon)
Displays a dramatic winner reveal stage with confetti animations, designed for live-streaming and events. Requires Raffle for WooCommerce Pro.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID | Required | Which raffle's winners to reveal |
style | confetti, spotlight, simple | confetti | Animation style |
show_ticket | true, false | true | Show winning ticket number |
show_city | true, false | true | Show winner's city |
show_method | true, false | false | Show draw method |
heading | Text | "Winner Reveal" | Custom heading text |
Examples
[raffle_reveal id="123"]
[raffle_reveal id="123" style="spotlight" heading="And the winner is..."]
[raffle_reveal id="456" show_ticket="false" show_city="false"]
Notes:
- Winners must be drawn first using the free plugin's winner selection system.
- Winner data is loaded via AJAX so it never appears in the page source before the reveal.
- Includes a Full Screen button for live-streaming overlays.
- Respects the
rfwc_mask_winner_namefilter for privacy. - See the Winner Reveal documentation for full details.
[raffle_entries] (Pro addon)
Displays a public list of raffle entries with ticket numbers and optional participant names. Includes pagination, search, and a Print / PDF button. Requires Raffle for WooCommerce Pro.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
id | Product ID | Required | Which raffle's entries to display |
Example
[raffle_entries id="123"]
Notes:
- The raffle must have the Entry List enabled in its product settings.
- Privacy level, entries per page, and search availability are controlled by the per-product settings.
- If the Pro addon is not active or the entry list is not enabled, nothing is displayed.
- See the Entry List documentation for full configuration details.
Use cases
Landing pages
Create a dedicated raffle page with:
<h2>Current Raffle</h2>
[raffle_card id="active"]
<h2>All Our Raffles</h2>
[raffle_cards status="all" columns="3" limit="9"]
Sidebar widgets
Add a compact countdown to your sidebar:
[raffle_countdown id="active" format="compact"]
[raffle_status id="active"]
Blog posts
Embed a specific raffle in a blog post:
Check out our latest raffle:
[raffle_card id="123"]
Homepage promotion
Feature active raffles on your homepage:
[raffle_cards status="active" limit="3" columns="3"]
Winners page
Create a dedicated winners page to showcase past raffle winners:
<h2>Latest Winner</h2>
[raffle_winners id="latest"]
<h2>Holiday Raffle Winners</h2>
[raffle_winners id="456" show_link="true"]
Styling
All shortcodes use the plugin's built-in CSS classes prefixed with rfwc-. The cards and elements inherit your theme's styling and are fully responsive.
CSS classes
| Element | CSS Class |
|---|---|
| Card container | .rfwc-card |
| Cards grid | .rfwc-cards-grid |
| Card image | .rfwc-card-image |
| Card title | .rfwc-card-title |
| Card price | .rfwc-card-price |
| Card prize | .rfwc-card-prize |
| Card button | .rfwc-card-button |
| Winners section | .rfwc-winners-section |
| Winner item | .rfwc-winner-item |
| Winner avatar | .rfwc-winner-avatar |
| Winner name | .rfwc-winner-name |
| Winner city | .rfwc-winner-city |
| Winner ticket | .rfwc-winner-ticket |
| Product link | .rfwc-winner-product-link |
Tips
- Use
activekeyword instead of hardcoding IDs; it automatically shows the current raffle. - Combine shortcodes for rich pages (card + progress + prize).
- Keep grids responsive: use 2-3 columns for best mobile experience.
- Cache-friendly: shortcode output updates on each page load.
- Winners on any page: use
[raffle_winners]on a dedicated "Winners" page to showcase past draws.