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.
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 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:
The promo box shortcode comes with predefined layout but you can easili change it with a theme CSS.