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 the shortcode will show nothing if there are no available products with a discount.
With a [promo_box] shortcode, you can build a section on the website where the sales promotion will appear.
You can use “include” and “exclude” shortcode attributes to advertise different products in certain sections on a page.
Shortcode attribute: include
The ‘include’ attribute will show only products with selected ids.
Shortcode attribute: exclude
The exclude attribute will show the discount products that don’t have the selected id.
Shortcode attribute: image
You can show the product image inside the shortcode output. Use the following: [promo_box image=”1″].
After you place a desired shortcode on a page, post, product or any other content page, it will show up as in the example below:
The promo box shortcode has a predefined layout, but you can easily change it with CSS.