Magento WordPress Shortcodes & Widgets Product ShortcodeShortcodes & Widgets

« Back to Magento WordPress Shortcodes & Widgets

The Shortcodes & Widgets add-on module allows you to use a Product shortcode to quickly and easily add product lists directly into your WordPress posts and pages.

Product Shortcode Options

There are several options for the product shortcode and these can be used separately or combined.

ids

A comma separated list of product IDs. Products will be ordered using the order you enter the IDs.

[product ids="123,54,76,124"]

skus

A comma separated list of product SKUs. Products will be ordered using the order you enter the SKUs.

[product skus="first-sku,second-sku,another-product"]

category_id

A single category ID. Products will be ordered using the position in the category.

[product category_id="3"]

on_sale

A 1 to include products on sale and a 0 to include products not on sale

[product on_sale="1"]

limit

Entering 0 removes the limit. Any other number will limit products to this number. This must be used in conjunction with another option.

[product on_sale="1" limit="12"]

Combining Options

You can combine options above into a single Product Shortcode.

This shortcode will display 12 products that are on sale from the category with the ID or 3.

[product category_id="3" on_sale="1" limit="12"]