
Launching an ecommerce store is a hefty task. Even user-friendly options, like the WooCommerce plugin, can seem daunting for beginners and non-coders. For instance, you’ll need to organize products and add elements like an order tracking form to set up your store.
Fortunately, you can easily customize your store and add functionality with WooCommerce shortcodes. For example, you can use them to display related products, customer reviews, and more. You’ll also find WooCommerce cart shortcodes, WooCommerce checkout shortcodes, and other essential options.
In this post, we’ll take a closer look at WooCommerce shortcodes and when to use them. Then, we’ll look at some basic shortcodes and explain how to add them to your ecommerce website. Let’s get started!
What Are WooCommerce Shortcodes?
A WooCommerce shortcode is a small code snippet that enables you to add specific functionality to a page or post. They save time and eliminate the need for advanced coding when setting up your store.
Some default WooCommerce pages already have shortcodes embedded to simplify the design process. You can display products, specific categories, and more with a simple code.
For instance, you can set up a WooCommerce checkout page with a shortcode:

Here, customers can input their shipping information and payment details. Plus, they see the total price and are able to enter coupon codes.
Furthermore, you can combine multiple shortcodes on a single page. For instance, you can showcase related products on the shopping cart page:

Here, customers can view the items that are currently in their cart. They can also see related products and add them to the cart without leaving the page.
Unlike blocks, shortcodes are easy to customize and don’t require complex code. When you use WooCommerce shortcodes, you can effortlessly create custom WordPress pages with fast load speeds.
The codes are notated in brackets without spaces. For example, [featured_products] is a basic shortcode that displays a store’s featured products. Note that adding spaces to basic shortcodes will incorrectly display the code.
Additionally, WooCommerce shortcodes can be modified with certain product attributes to customize the layout and presentation. Attributes are notated with quotation marks.
For example, [products display=”grid”] will display products in a grid layout.
Useful Woocommerce Shortcodes
Shortcodes simplify the design process and create a faster store with increased functionality. Let’s take a closer look at different ways to use WooCommerce shortcodes for pages and products.
WooCommerce Page Shortcodes
A WooCommerce page shortcode generates a specific page, such as a checkout form or shopping cart page.
WooCommerce stores cannot properly function without certain pages (like cart, checkout, and account). That’s why many page shortcodes are automatically added to WooCommerce page templates.
For example, the WooCommerce account page shortcode enables customers to log into their account, review purchase history and payment methods, and more:

Key WooCommerce page shortcodes include:
- [woocomerce_cart] displays a WooCommerce cart page. This shortcode shows what’s in customers’ shopping carts. Plus, they can view the price, remove items, and enter a coupon code.
- [woocommere_checkout] initiates the WooCommerce checkout process. On the checkout page, customers can add their billing details, a shipping address, and more information pertinent to the checkout process.
- [woocommece_my_account] displays an account page with customer information (when logged in) or a registration form for new users. Users can update their profile, view purchase history, add credit card details, and more from the account page.
- [woocommerce_order_tracking] allows customers to view and track their recent orders.
WooCommerce Product Shortcodes
While page shortcodes generate specific pages, a product shortcode determines how products are displayed on a page or post.
Key WooCommerce product shortcodes include:
- [products] displays your WooCommerce products.
- [product id=”xx”] displays a specific product.
- [featured_products] displays featured products.
- [recent_products] displays recent products.
- [best_selling_products] displays best-selling products.
- [top_rated_products] displays top-rated products.
- [sale_products] displays products on sale.
- [related_products] displays related products.
- [add_to_cart id=”xx”] adds an item to a customer’s cart.
- [products_reviews id=”xx”] displays product reviews.
- [woocommerce_product_filter] generates a live product search filter. This creates a search bar where customers can refine the products displayed.
Furthermore, you can customize a WooCommerce product shortcode using unique attributes. This can enhance your website’s functionality while creating a unique layout for your store.
Plus, keeping an organized store can help you manage your products better. Different shortcode parameters include:
- columns defines the number of columns on a product page.
- orderby customizes how products are arranged. Otherwise, products are organized by title.
- order determines whether the products are displayed in descending (DESC) or ascending order (ASC). Without defining the products’ order, they will be organized in ascending order by default.
- limit controls the number of products displayed. Without defining the limit parameter, all products are displayed by default.
For instance, [products columns=”3″ orderby=”name” order=”ASC”] will display products in three columns, ordered by name, in ascending order.
Here, items are arranged in four columns and sorted by best-selling products first:

You can also organize WooCommerce products by categories, tags, and attributes. This can help customers find the right products faster.
Product categories are the main way to organize multiple products. You can display all the product categories with [product_categories] or a single product category with [product_category].
Then you can create additional parameters to control how categories appear, such as:
- [product_categories ids=”xx,xx] displays specific product categories.
- [product categories hide_empty=”1″] hides or displays empty categories. Input “0” to display all the empty categories and “1” to hide them.
Using product tags, you can group products with similar qualities. Tags tend to be more precise than product categories. For example, if you sell clothing, some of your tags might include [product_tags=”casual, summer”].
Lastly, you can use attributes to organize items. Attributes help customers find products with a specific characteristic, such as size or color.
While we’ve covered several functions, this WooCommerce shortcodes list is not exhaustive. There are hundreds of other shortcodes you can use to display and organize your products.
How to Add Shortcodes to Your WooCommerce Store
Adding WooCommerce shortcodes to your store is easy when you know the steps. After you install the WooCommerce plugin, navigate to the page or post where you want to add the shortcode.
With the classic editor, you can type or paste the shortcode into the page content. If you’re using the block editor, you can add the Shortcode block to the page and enter the code in the field provided:

Note that when you add a shortcode to the page, you won’t be able to see the element you added on the back end. You’ll need to view the page on the front end (as a visitor), or just click on Preview, to see the elements you added.
Conclusion
WooCommerce shortcodes can be quite handy when designing your online store. You can add them to any page on your site, including your cart and checkout pages.
You’ll find shortcodes for displaying product categories, relevant products, best-selling items, and a lot more. Additionally, you can add parameters to control the layout of the elements you want to display. You also have the option to group items by categories, tags, and attributes.
Do you have any questions about WooCommerce shortcodes and how to use them? Let us know in the comments section below!
Sophia is a staff writer at WordCandy.co, where she produces quality blog content for WordPress plugin and theme developers, hosting providers, website development and design agencies, and other online businesses.
Leave a Reply