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
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 →

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"]

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
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.