When you use a WordPress you may have found that the process of creating beautiful pages of products, categories, and to add cart takes much time when you use the WooCommerce store. However, there is one little secret that can take all this work out of your hands; and that secret is WooCommerce Shortcodes.

Shortcodes are small pieces of code contained within square brackets, such as this: shortcodes look like this: [example]. WordPress uses them to tell it to show you something specific without your having to write up any complex code.

To WooCommerce users, shortcodes are extremely useful since they could easily retrieve contents on the shopping cart, products, categories, etc all through just a text input.

In this guide, we’ll explore:

  • What WooCommerce shortcodes are

  • Why they’re useful for your store

  • The complete list of WooCommerce shortcodes

  • How to use them effectively

  • A quick reference table for easy use

1. What Are WooCommerce Shortcodes?

In simple words, shortcodes are shortcuts for adding features to your WooCommerce website.
Instead of creating an entire page layout from scratch, you can add a shortcode in your page or post, and WooCommerce will automatically show the desired element — like a product grid or checkout page.

For example:

[products limit="4" columns="2"]

 

This code will show 4 products in 2 columns without you designing anything manually.

2. Why Use WooCommerce Shortcodes?

Using WooCommerce shortcodes can save time and make your site more flexible.
Here are some benefits:

  • Fast and Easy – Just type a shortcode, and WooCommerce does the rest.

  • Customizable – Change numbers, categories, and layouts directly in the shortcode.

  • No Coding Skills Needed – Even beginners can use them.

  • Reusable – Copy and paste the same shortcode wherever you want.

  • Consistent Look – Keeps your product display format uniform across your store.

3. How to Add WooCommerce Shortcodes in WordPress

You can add WooCommerce shortcodes anywhere that accepts text input, such as:

  • Pages

  • Posts

  • Widgets

  • Custom HTML blocks

  • Theme template files (with PHP functions)

Steps to add a shortcode:

  1. Go to Pages or Posts in WordPress Dashboard.

  2. Click Edit on the page where you want to add the shortcode.

  3. Use a Shortcode Block in the block editor (Gutenberg) or paste it in the Classic Editor.

  4. Save and preview your page.

4. WooCommerce Shortcodes List

Here’s the complete list of commonly used WooCommerce shortcodes and what they do.

A. Shop Pages Shortcodes

Shop Page

[products]

  1.  Displays all products.

Cart Page

[woocommerce_cart]

  1.  Shows the shopping cart content.

Checkout Page

[woocommerce_checkout]

  1.  Displays the checkout form.

My Account Page

[woocommerce_my_account]

  1.  Shows user account details, orders, and addresses.

Order Tracking Page

[woocommerce_order_tracking]

  1.  Lets customers track their orders.

B. Product Display Shortcodes

Single Product by ID

[product id="99"]

  1.  Displays one product (replace 99 with your product ID).

Multiple Products by ID

[products ids="1,2,3"]

  1.  Shows multiple products by their IDs.

Recent Products

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

  1.  Displays recently added products.

Featured Products

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

  1.  Shows featured products.

Sale Products

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

  1.  Displays products currently on sale.

C. Category-Based Shortcodes

Products by Category

[product_category category="shirts"]

  1.  Shows products from the "shirts" category.

Multiple Categories

[product_categories number="12" columns="4"]

  1.  Lists all categories.

 

D. Special Shortcodes

Best-Selling Products

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

  1.  Displays top-selling products.

Top Rated Products

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

  1.  Shows products with the best ratings.

Related Products

[related_products per_page="4"]

  1.  Displays products related to the current product.

5. WooCommerce Shortcodes Parameters

Shortcodes often come with parameters — little settings you can change inside them to customize the display.
For example:

[products limit="6" columns="3" orderby="date" order="DESC"]

 

Here’s what these parameters mean:

  • limit – Number of products to show

  • columns – How many products per row

  • orderby – Sort by date, title, price, etc.

  • order – Sort in ascending (ASC) or descending (DESC) order

6. Quick Reference Table for WooCommerce Shortcodes

Shortcode

Purpose

Example

[products]

Show all products

[products]

[woocommerce_cart]

Display shopping cart

[woocommerce_cart]

[woocommerce_checkout]

Display checkout form

[woocommerce_checkout]

[woocommerce_my_account]

Show user account details

[woocommerce_my_account]

[woocommerce_order_tracking]

Order tracking page

[woocommerce_order_tracking]

[product id="99"]

Single product by ID

[product id="45"]

[products ids="1,2,3"]

Multiple products by IDs

[products ids="2,4,6"]

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

Recently added products

[recent_products per_page="6" columns="3"]

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

Featured products

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

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

Products on sale

[sale_products per_page="5" columns="2"]

[product_category category="shirts"]

Products from a single category

[product_category category="electronics"]

[product_categories number="12" columns="4"]

List multiple categories

[product_categories number="8" columns="4"]

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

Best-selling products

[best_selling_products per_page="6" columns="3"]

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

Top-rated products

[top_rated_products per_page="5" columns="5"]

[related_products per_page="4"]

Related products

[related_products per_page="3"]

 

7. Tips for Using WooCommerce Shortcodes

  • Always test shortcodes on a staging site before using them on a live store.

  • Combine parameters to customize the output.

  • Use shortcodes in widgets to show products in sidebars.

  • Keep your WooCommerce plugin updated for the latest shortcode options.

  • Avoid using too many shortcodes on one page to prevent slow loading.

8. Final Thoughts

WooCommerce shortcodes are effective tools that will save you some valuable time during the process of constructing and tailoring your online store. Shortcodes are PHP-based functions which allow quickly and easily displaying a single product or a full shop page.

After you use them first, you will find you can generate custom layouts a lot quicker.

And in case you fancy learning how these shortcodes actually work in the backend you can also learn how the WordPress file structure is and where wordpress.org stores its template files to help WooCommerce works.

Also Read: Cliqly Email Marketing