WooCommerce

10 Practical WooCommerce Shortcodes

1 min readUpdated September 11, 2022
WooCommerce shortcodes reference guide

WooCommerce shortcodes let you display products, categories, and more anywhere on your site with a single line of code. Here are the 10 most useful ones.

WooCommerce has some very useful shortcodes, especially for themes that are not built specifically for WooCommerce. We often get requests from customers who want to display products on their homepage or other pages — this usually requires only one line of a shortcode.

Recent Products

[recent_products per_page="12" columns="4"]

Featured Products

[featured_products per_page="12" columns="4"]

Single Product

Display a single product by ID or SKU:

[product id="99"]
[product sku="FOO"]

Multiple Products

Display multiple specific products:

[products ids="1, 2, 3, 4, 5" columns="4"]
[products skus="foo, bar, baz" columns="4"]

Full Product Page

[product_page id="99"]
[product_page sku="FOO"]

Product Category

Display all products in a specific category:

[product_category category="appliances" per_page="12" columns="4"]

All Product Categories

[product_categories columns="4"]

Sale Products

[sale_products per_page="12" columns="4"]

Best Selling Products

[best_selling_products per_page="12" columns="4"]

Top Rated Products

[top_rated_products per_page="12" columns="4"]

Tips & Notes

  • Adjust per_page to control how many products are shown
  • Change columns to fit your layout (1–6)
  • Shortcodes work in any WordPress page, post, or widget area
  • These shortcodes are built into WooCommerce — no extra plugin needed