Product Shortcode

[show_products] shortcode is available with various attributes:

  • category – to show products only from specific categories (default is all categories available in catalogue)
  • product – to show only specific products (default is all products from catalogue)
  • products_limit – to limit number of product to given amount (default is unlimited)
  • archive_template – to choose specific archive template for this particular listing (default is the selection in product settings)
  • design_scheme – to choose specific color & size (default is the selection in product settings)
  • sort – set to 0 to disable or 1 to enable product sort selector
  • order – set to ASC for asceding order and DESC for desceding
  • orderby – possible values: rand (random), date, modified, name, none
  • pagination – set to 1 to enable shortcode pagination (products_limit parameter defines the number of elements per page if pagination is enabled) – Since: eCommerce Product Catalog 2.4.14
  • post_type – to show entries from a different post type generated by WordPress or any third party plugin, click here for details
  • per_row – set shortcode products per row
  • empty – text that shows up when there are no products to display

Show specific products by ID

Use “product” attribute to show specific products from the catalog. To do it just place comma separated product ids as product attribute value.

[show_products product="1,89,93"] will show products with ids 1, 89 and 93.

Lets show only two products with ids 4 and 6

Product ids can be found in product table in WordPress admin:

Product ids

Show products only from specific categories

To show products from one or multiple categories just place comma separated category ids as category attribute value.

[show_products category="2,5,8"] will show products from categories with ids 2, 5 and 8.

Category ids can be found in category table in WordPress admin:

Product Category ID

Change number of products listed

“products_limit” shortcode attribute will limit the product listing to specified number.

[show_products products_limit="5"] will show maximum 5 products.

Select shortcode archive template

With archive_template attribute it is possible to choose one of available product listing templates. By default three product listing templates are available: “default” (for Modern Grid template), “list” (for Classic List template), “grid” (for Classic Grid template).

[show_products archive_template="list"] will show product listing with Classic List template (even if different template is selected in product settings).

How to use shortcode with multiple attributes?

Multiple attributes can be used at the same time.

[show_products category="2" archive_template="classic-list"] will show products from category with id=2 and with classic list template.

Lets play with product listing templates

Sometimes there is a need to show products with different templates at multiple part of the website. With eCommerce Product Catalog this was never easier!