1. Cart page

Your cart is currently empty.

Return to shop

This shortcode displays the shopping cart page on the chosen space within your WooCommerce store. It shows the customer’s shopping cart content and provides options to update items, apply coupon codes, and proceed to checkout.
WooCommerce cart page displayed using the
Your cart is currently empty.

Return to shop

shortcode
Most WooCommerce themes automatically include this shortcode on the shopping cart page, but you can use it to create a custom one. Since it doesn’t have customizable attributes, you only need to paste the code as is to use it.
2. Checkout page

This shortcode embeds a checkout form in your WooCommerce checkout page. Customers can use the form to submit their billing and shipping information, choose a payment method, and review their order before placing it.
WooCommerce checkout form displayed using the
shortcode
3. User account page

Login

Register

A link to set a new password will be sent to your email address.

Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our privacy policy.

This WooCommerce shortcode displays the user account area. You can use it to create a user account page where logged-in customers can manage their personal information, track orders, manage addresses, and change passwords.
For guests who aren’t logged in, this shortcode shows a sign-in form.
WooCommerce user account section displayed using the

Login

Register

A link to set a new password will be sent to your email address.

Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our privacy policy.

shortcode
4. Order tracking form

To track your order please enter your Order ID in the box below and press the "Track" button. This was given to you on your receipt and in the confirmation email you should have received.

If your eCommerce store sells physical products, this shortcode lets customers track their orders. It displays a form where they can enter their order ID and email address to check the status, allowing you to create a custom order tracking page quickly.
WooCommerce order tracking form displayed using the

To track your order please enter your Order ID in the box below and press the "Track" button. This was given to you on your receipt and in the confirmation email you should have received.

shortcode
Unlike the Order section in

Login

Register

A link to set a new password will be sent to your email address.

Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our privacy policy.

, users don’t need an account or to log in to use this feature. Enable quick order status checks with this shortcode to enhance user experience.
5. Show a specific product page

Use this shortcode to feature a product by its ID or Stock Keeping Unit (SKU) code anywhere on your page or post. It displays the product’s information, including the title, price, description, reviews, and an add-to-cart button.
WooCommerce product page displayed using the shortcode
Here’s an example of the product page shortcode with both attributes:

You can use the shortcode multiple times on the same page to showcase different products. Just remember to add a separate shortcode block for each one.
6. Product listings

This is one of the most versatile WooCommerce shortcodes due to its extensive selection of attributes.
While showcases a full product page, the shortcode lets you display specific product details without the full page layout. It’s ideal for featuring products in a more compact format, such as within a list or a blog post.
WooCommerce product listings displayed using the shortcode
Product attributes
Here are the key attributes for customizing the output of the WooCommerce shortcode:
id
This attribute displays a specific item by its product ID.
Example: skus
This attribute shows a specific product based on their SKU. Avoid using it together with the ID attribute to prevent conflicting output.
Example:
limit
Use this attribute to control how many products appear when featuring multiple products using a single shortcode.
Example: columns
This attribute sets the number of columns for displaying products, which is great for saving space. It defaults to four columns unless specified otherwise.
Example: orderby
This attribute lets you specify the sorting order of the displayed products.
Here are the available options:
title (default) ‒ sort by the product title.
date ‒ sort by the product publication date.
popularity ‒ sort by the number of purchases.
rating ‒ sort by average product rating.
rand ‒ display products in random order.
id ‒ sort by product ID.
Example: order
This attribute defines whether the product order is ascending (ASC) or descending (DESC). It defaults to ascending unless specified otherwise.
Example: category
Use this attribute to display products from specific categories based on their slugs. Separate multiple category slugs with commas.
Example:
tag
This attribute shows products with specific tags. Similar to the category attribute, use commas to separate multiple product tags.
Example:
class
This attribute adds a custom CSS class to modify the output’s style. Before using it, you must create a custom CSS class in your theme’s stylesheet (style.css).
Example: on_sale
This attribute lets you show products that are on sale. When used, WooCommerce filters your products and shows only those with a sale price. Set it to true to enable this filter or false to show all products.
Avoid using on_sale with best_selling and top_rated attributes to prevent conflicting outputs, as combining them can create confusion over which criteria should be prioritized.
Example: best_selling
Use this attribute with a true value to showcase best-selling products only. Don’t use it together with the on_sale and top_rated attributes to avoid conflicting prioritization.
Example: top_rated
This attribute showcases top-rated products based on user ratings, accepting true and false as its options. Avoid using it together with the on_sale and best_selling attributes to prevent conflicting filters.
Example: paginate
Set this attribute to true to enable pagination for the retrieved products. Combine it with the limit attribute to control the number of products displayed per page.
Example: visibility
This attribute filters products by their visibility status, such as:
visible (default) ‒ products visible in the shop and search results.
catalog ‒ products visible in the shop only, not in search results.
search ‒ products visible in search results only, not in the shop.
hidden ‒ products hidden from both the shop and search results.
featured ‒ products marked as featured.
Example: 7. Show all available product categories

This shortcode allows users to browse product categories on your WordPress site more easily. It shows all the product categories by default, but you can customize the output using the following attributes:
number ‒ set the number of categories displayed. It works similarly to the limit attribute in the shortcode.
columns ‒ define the number of columns to display the retrieved categories.
include ‒ determine which categories to show by their IDs.
orderby ‒ specify the sorting order of the displayed product categories. Here are the available options:
name ‒ sort by product category name.
id ‒ sort by category ID.
slug ‒ sort by category slug.
menu_order ‒ sort by the menu order assigned in WooCommerce settings.
count ‒ sort by the number of products in each category.
order ‒ define whether the product category order is ascending (ASC) or descending (DESC).
hide_empty ‒ hide categories that don’t have any products.
parent ‒ display product categories that are children of a specific parent category.
Example: 8. Display a specific product category

Despite having a similar name to the

shortcode, focuses on displaying products from the specified category. It’s ideal for featuring relevant products on their respective category landing pages or highlighting trending items from a particular category.
This shortcode requires the category attribute with your chosen product category’s slug to work. You can then pair it with the following attributes to customize the output:
columns ‒ set the number of columns to display products. The default value is 4.
orderby ‒ determine the sorting method. It has the same options as the orderby attribute in the shortcode.
order ‒ specify the sorting order.
per_page ‒ limit the number of products displayed per page.
paginate ‒ enables pagination when set to true.
Example:
9. Related products

Adding this shortcode to a product page prompts WooCommerce to show related products based on the categories and tags shared by the current product being viewed.
Since you can’t manually choose the related products, this shortcode is best used on individual product pages for cross-selling.
Pair this shortcode with the posts_per_page attribute to limit the number of related products displayed. You can also use the columns attribute to control the layout of the output.
Example: 10. Recently added products

Use this shortcode to display the most recently added products in strategic places, such as your homepage or category landing pages. Pair it with the limit, columns, and orderby attributes to customize the output.
11. Featured products

This shortcode is ideal for highlighting featured products or promotions on your site. Like the shortcode, it accepts limit, columns, and orderby attributes for display customization.
12. Best-selling products

Highlight your best-selling products with this shortcode to establish social proof, showing customers that these items are popular among other buyers. This approach helps influence visitors’ buying decisions, prevent slow-moving inventory, and build trust with your target market.
Use limit, columns, and orderby attributes to customize your product display.
13. Top-rated products

This shortcode displays a list of top-rated products based on customer reviews. Like the shortcode, it’s great for influencing buying decisions and building customer trust.
Combine this shortcode with the limit, columns, and orderby attributes to customize the output.
14. Discounted products

If you want to create a dedicated sales page or section to promote discounted products, this shortcode makes the job easier. Simply add the limit, columns, and orderby attributes to customize how the section appears.
15. Add-to-cart button and URL

The shortcode adds an add-to-cart button for a specific product on your chosen page or post. This way, customers can easily add items to their cart without visiting individual product pages, which is useful for promoting products on non-WooCommerce pages.
Use the id or sku attribute to link a product to the add-to-cart button. You can then customize the button’s appearance with additional attributes, such as:
style ‒ customize the button’s style with inline CSS, which applies only to that particular element.
show-price ‒ display the product price next to the add-to-cart button when set to true.
class ‒ add a reusable custom CSS class to modify the button’s appearance.
quantity ‒ specify the quantity added to the cart.
The following shortcode is an example of using these attributes to show the product price next to the button and center its placement: If you prefer not to use a button for the add-to-cart function, consider using to create a link instead. This shortcode generates a direct URL that automatically adds a specific product to the cart when visited.
It’s convenient for encouraging sales in emails or areas of your WooCommerce site where button placement might be limited.
Since this shortcode creates a link, you only need to add the id or sku attribute for the chosen product.
Example: 16. Shop notifications on non-WooCommerce pages

This shortcode lets you display WooCommerce messages or notifications anywhere on your site when customers interact with it. These messages can include alerts like “Product added to cart,” “Coupon applied successfully,” or error messages if something goes wrong during checkout.
When placed strategically, the
shortcode can help reduce confusion at critical points in the customer journey and enhance the overall shopping experience. It’s also useful on custom pages where important notices need to be visible to customers.
This shortcode doesn’t have any attributes, so you just need to place it in the desired location. The messages are customizable, but doing so requires using a WordPress filter or overriding the theme files in the notices directory.
WooCommerce store notification displayed using the
shortcode
17. Live product search field with filters

[woocommerce_product_search] WooCommerce Product Search, a premium WooCommerce extension, offers this shortcode to display live product search filter functionality on pages and posts. As customers type keywords into the search field, matching results appear in real-time, enhancing the user experience.
By default, the [woocommerce_product_search] shortcode shows product titles with their short descriptions, prices, and add-to-cart buttons. To customize the display, refer to the extension’s documentation for available attributes.
WooCommerce product search field displayed using the [woocommerce_product_search] shortcode
You can expand the search functionality with various filters. Use these filters with the [woocommerce_product_filter_products] shortcode to display search results dynamically:[woocommerce_product_filter] — displays a live Product Search filter where visitors can input keywords to refine their results.[woocommerce_product_filter_attribute] — shows a live Product Attribute filter, ideal for stores selling variable products.[woocommerce_product_filter_category] — embeds a live Product Category filter to only output specified results by category.[woocommerce_product_filter_price] — displays a live price filter with an input field and slider to set a desired price range.[woocommerce_product_filter_tag] — adds a live Product Tag filter where visitors can refine results by chosen tags.[woocommerce_product_filter_rating] – embeds a live Product Rating filter to display products by average customer rating.[woocommerce_product_filter_sale] – shows a live filter for discounted products.[woocommerce_product_filter_stock] – features products that are in stock or available for backorder.[woocommerce_product_filter_reset] – adds a button to clear all live filters.