Show sales with a shortcode

This feature is a part of Product Discounts. Click here to see all Product Discounts features.

You can use a shortcode to promote a product with a discount applied. To place a promo box use the [[promo_box]]. You can place it anywhere on the website and it will show a random product with the discount applied. That means if there are no available products with a discount the shortcode will show nothing.

With a [[promo_box]] shortcode you can build a sections on the website where the sales promotion will appear.

If in certain sections on a page different products shoould be advertised you can use “include” and “exclude” shortcode attributes.

Shortcode attribute: include

The include attribute will show only products with selected ids.

A shortcode [[promo_box exclude=”2″]] will never show a product with a id “2” (even if it has a discount applied).

Shortcode attribute: exclude

The exclude attribute will show the discount products that don’t have the selected id.

The “include” attribute works in opposite. E.g. a shortcode [[promo_box include=”2″]] will show only a product with id “2” but only if it has the discount applied.

Shortcode attribute: image

You can show the product image inside shortcode output. Use the following: [[promo_box image=”1″]].

After you place a desired shortcode on page, post, product or any other content page it will show up:

Product Discount Promo Box

The promo box shortcode comes with predefined layout but you can easili change it with a theme CSS.