Sitewide Sale Shortcode

Before Sitewide Sales offered block editor integration, sales were primarily built using the [sitewide_sale] shortcode and three sections of text for each sale period.

With recent plugin improvements, we now recommend using the Sale Content block or setting visibility for sections of content using block settings or your favorite page builder.

These docs explain how to use the [sitewide_sale] basic shortcode or enclosure shortcode and attributes if you prefer the shortcode method.

How to Insert the Shortcode

You can use the [sitewide_sale] shortcode in three methods:

// Specify a period to pull in content from your Sitewide Sale settings page.
[sitewide_sale time_period="pre-sale"]
// Use the shortcode as an enclosure and display nested content during the defined period.
[sitewide_sale time_period="sale"] … content … [/sitewide_sale]
// Enter the basic shortcode and let the current date and time specify the period, pull in content from your Sitewide Sale settings page.

Shortcode Attributes

  • sitewide_sale_id: optional; Enter the numeric ID of the sale for this content. If none is specified, the shortcode uses the landing page’s assigned sale ID OR the active sale for your site.
  • sale_period: Enter the sale period to show this content. This attribute accepts three options:
    • pre-sale: Content is shown before the sale begins.
    • sale: Content is shown when the sale is running.
    • post-sale: Content is shown after the sale ends.

Screenshot: Using the Shortcode In the Editor

Example editor screenshots using the [sitewide_sale] shortcode
Example editor screenshots using the [sitewide_sale] shortcode