Get Plugin

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

ShortcodeDescription
[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)
Scroll to see all columns →

[raffle_card]

Displays a single raffle product card with image, countdown, prize details, and a "Buy Ticket" button.

Attributes

AttributeValuesDefaultDescription
idProduct ID, latest, activeAuto-detectWhich raffle to show
Scroll to see all columns →

Examples

[raffle_card id="123"]
[raffle_card id="latest"]
[raffle_card id="active"]
  • latest shows the most recently published raffle.
  • active shows the first currently active raffle.
  • If id is 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

AttributeValuesDefaultDescription
idsComma-separated IDs-Specific raffle IDs to show
categoryCategory slug(s)-Filter by product category
statusactive, ended, allactiveFilter by raffle status
limit1506Maximum cards to display
columns143Number of grid columns
orderbydate, price, title, randomdateSort order
orderASC, DESCDESCSort direction
Scroll to see all columns →

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"]
  • When ids is 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

AttributeValuesDefaultDescription
idProduct ID, latest, activeAuto-detectWhich raffle
formatcompact, fullcompactTimer style
Scroll to see all columns →

Examples

[raffle_countdown id="123"]
[raffle_countdown id="active" format="full"]
[raffle_countdown id="latest" format="compact"]
  • 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

AttributeValuesDefaultDescription
idProduct ID, latest, activeAuto-detectWhich raffle
Scroll to see all columns →

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

AttributeValuesDefaultDescription
idProduct ID, latest, activeAuto-detectWhich raffle
Scroll to see all columns →

Example

[raffle_prize id="123"]

[raffle_status]

Displays a status badge for a raffle.

Attributes

AttributeValuesDefaultDescription
idProduct ID, latest, activeAuto-detectWhich raffle
Scroll to see all columns →

Example

[raffle_status id="123"]

Status labels

Raffle StateBadge Label
Not yet startedComing Soon
Currently activeActive
All tickets soldSold Out
Past end dateEnded
Winner drawnWinner Selected
Scroll to see all columns →

[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

AttributeValuesDefaultDescription
idProduct ID, latest, activeAuto-detectWhich raffle
show_avatartrue, falsetrueShow winner's Gravatar
show_citytrue, falsetrueShow winner's city (from billing data)
show_tickettrue, falsetrueShow winning ticket number
show_datetrue, falsetrueShow draw date
show_linktrue, falsetrueShow link to the raffle product
limitNumber0 (all)Max number of winners to display
Scroll to see all columns →

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"]
  • 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_name filter is enabled (name privacy), city is automatically hidden.
  • Stores can disable city display globally using the rfwc_show_winner_city filter (default true).

[raffle_wheel] (Pro addon)

Displays the Lucky Wheel / Spin to Win prize wheel for a raffle. Requires Raffle for WooCommerce Pro.

Attributes

AttributeValuesDefaultDescription
idProduct IDRequiredWhich raffle's wheel to display
Scroll to see all columns →

Example

[raffle_wheel id="123"]
  • 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

AttributeValuesDefaultDescription
idProduct IDRequiredWhich raffle's winners to reveal
styleconfetti, spotlight, simpleconfettiAnimation style
show_tickettrue, falsetrueShow winning ticket number
show_citytrue, falsetrueShow winner's city
show_methodtrue, falsefalseShow draw method
headingText"Winner Reveal"Custom heading text
Scroll to see all columns →

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"]
  • 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_name filter 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

AttributeValuesDefaultDescription
idProduct IDRequiredWhich raffle's entries to display
Scroll to see all columns →

Example

[raffle_entries id="123"]
  • 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

ElementCSS 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
Scroll to see all columns →

Tips

  • Use active keyword 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.