Back to featured insights
WooCommerce Shop Shortcodes: Complete List, Uses and More
WooCommerce Shop Shortcodes make it easier to customize and manage your online store. In this guide, we cover a complete list of shortcodes, their uses, and how they can help you display products, carts, checkout forms, and more with just a few simple lines of code.
Table of Content
Share
WooCommerce shop shortcodes are powerful tools that make it easy to customize your online store. They help improve your store’s functionality and enhance the shopping experience without complex coding. Perfect for store owners, entrepreneurs, and WordPress users of all levels, these shortcodes give you the flexibility to create a professional and engaging website.
In this guide, you’ll learn the most useful WooCommerce shop shortcodes, how to use them effectively, and tips to troubleshoot common issues.
Overview of WooCommerce Shop Shortcodes
What Are WooCommerce Shortcodes?
WooCommerce shortcodes are small pieces of code that let you display specific WooCommerce content anywhere on your WordPress site. By inserting a shortcode into a page, post, or widget area, you can easily add dynamic store elements such as products, categories, cart, or checkout—without the need for custom coding.
They give store owners flexibility to design and customize their online shop layout, making it possible to create a seamless shopping experience tailored to business needs. Whether you are a beginner or an advanced user, shortcodes provide a simple yet powerful way to control how your WooCommerce store looks and functions.
Benefits of Using WooCommerce Shop Shortcodes
Using WooCommerce shortcodes offers numerous significant advantages for managing and customizing your online store. Here are the main benefits:
- Ease of Use: Shortcodes are simple to learn and use, even for those without coding experience. You just need to copy and paste them into your posts, pages, or widgets.
- Time Savings: Instead of writing complex code or relying on additional plugins, shortcodes allow you to quickly add WooCommerce features to your website, saving significant development time.
- Increased Flexibility: Shortcodes provide high flexibility in designing your store’s layout. You can display products, categories, or other WooCommerce components anywhere you desire, not just limited to default shop pages.
- Powerful Customization: Many shortcodes come with attributes that allow you to deeply customize how content is displayed. For instance, you can specify the number of products, display by category, sort by price, and more.
- SEO Optimization: By creating custom landing pages with shortcodes, you can target specific keywords and improve your store’s search engine rankings.
- Enhanced User Experience: The ability to arrange and display content in a logical and appealing way helps improve the shopping experience for your customers.
- Reduced Theme Dependency: With shortcodes, you can retain core WooCommerce functionality even if you change your theme, providing more independence for your content.
- Effective Sales Page Creation: Easily build attractive sales pages with curated product collections, call-to-action buttons, and cart/checkout information all on one page.
For a deeper dive into customizing WooCommerce layouts, check out our detailed guide How to Edit WooCommerce Shortcodes: A Step-by-Step Guide to learn how to adjust shortcodes effectively.
List of Default WooCommerce Shortcodes
WooCommerce comes with a set of default shortcodes that make it easy to display essential store features anywhere on your site. Here’s the list:
- [woocommerce_cart]: Loads the shopping cart page, allowing customers to review and manage selected items before proceeding to checkout.
- [woocommerce_checkout]: Generates the checkout page, where customers provide shipping, billing, and payment details to complete their order.
- [woocommerce_my_account]: Renders the user’s personal account page, enabling customers to manage orders, addresses, and account details.
- [woocommerce_order_tracking]: Inserts the order tracking form, allowing customers to check the status of their orders.
- [product_page]: Renders the full single product page for a specific item identified by its ID or SKU.
- [products]: Presents a collection of products, which can be customized by ID, category, attribute, or other criteria.
- [product_category]: Lists products belonging to a specific, designated category.
- [product_categories]: Outputs a list of your product categories, with options to customize quantity and layout.
- [add_to_cart]: Generates an “Add to cart” button for a specific product, potentially including quantity options.
- [add_to_cart_url]: Provides the URL of the “Add to cart” button for a specific product, useful for custom links.
- [shop_messages]: Dynamically displays WooCommerce system messages (e.g., success, error notifications).
Examples of Common WooCommerce Shop Shortcodes
Let’s take a closer look at the available WooCommerce shortcodes and how to use them effectively. Remember, these shortcodes only work on WordPress websites with WooCommerce installed.
Cart page
[woocommerce_cart]This shortcode displays the shopping cart page in your WooCommerce store, showing customers their selected items along with options to update quantities, apply coupon codes, and proceed to checkout.
Most WooCommerce themes automatically place this shortcode on the cart page, but you can also use it to design a custom cart page. Since it doesn’t support additional attributes, simply paste the shortcode as it is to make it work.
Checkout page
[woocommerce_checkout]This shortcode adds a checkout form to your WooCommerce store, allowing customers to provide billing and shipping details, select a payment option, and confirm their order before completing the purchase.
User account page
[woocommerce_my_account]This shortcode displays the customer account area. Logged-in users can view and update their details, manage addresses, track orders, and change passwords. For guests, it automatically shows a login form.
Order tracking form
[woocommerce_order_tracking]If your store sells physical products, this shortcode provides an order tracking form. Customers can enter their order ID and email to check the status, making it easy to set up a custom order tracking page.
Unlike the Orders section in [woocommerce_my_account], this shortcode doesn’t require customers to log in. It allows quick order status checks, making the shopping experience more convenient.
Show a specific product page
[product_page]This shortcode lets you showcase a specific product by its ID or SKU anywhere on your site. It will display key details such as the product title, price, description, reviews, and an add-to-cart button.
You can add the [product_page] shortcode multiple times on a single page to display different products. Simply insert a separate shortcode block for each product.
Display a specific product category
[product_category]Although it has a similar name to [product_categories], the [product_category] shortcode serves a different purpose: it displays products from a specific category. This makes it perfect for building dedicated category landing pages or showcasing popular items within a chosen category.
To function, this shortcode requires the category attribute with the slug of the product category you want to display. You can further customize the output with attributes such as:
- columns – number of product columns (default is 4).
- orderby – sorting method, with the same options as the orderby attribute in [product_categories].
- order – sorting order (ASC or DESC).
- per_page – sets how many products to display per page.
- paginate – enables pagination when set to true.
Related products
[related_products]When added to a product page, this shortcode automatically displays related products based on the categories and tags of the item being viewed.
Because you can’t manually select which products appear, it’s most effective for cross-selling on individual product pages.
You can adjust its display with attributes like posts_per_page to limit the number of related products shown and columns to control the layout.
Best-selling products
[best_selling_products]Use this shortcode to highlight your store’s best-selling products and build social proof by showing customers what others are buying. This strategy not only encourages purchasing decisions but also helps reduce slow-moving inventory and strengthen customer trust.
You can customize the display with attributes such as limit, columns, and order by.
Top-rated products
[top_rated_products]This shortcode showcases a list of top-rated products based on customer reviews. Similar to [best_selling_products], it helps influence purchase decisions and strengthen customer trust.
You can customize the output using attributes such as limit, columns, and orderby.
How to Add a Shortcode in WooCommerce
Adding WooCommerce shortcodes to your WordPress site is straightforward, whether you’re working with the Gutenberg editor or the Classic Editor. Below is a step-by-step guide for inserting shortcodes with both methods.
Using the Shortcode Block in the Gutenberg Editor
Open the Page or Post – From your WordPress dashboard, go to the page or post where you’d like to insert the shortcode.
Add a Shortcode Block – Click the “+” icon to add a new block, then select Shortcode from the block options.
Once the Shortcode block is added, it will appear in your editor where you can paste the shortcode.
Paste the WooCommerce shortcode you want to use (for example, [woocommerce_cart]) into the block.
After adding the shortcode, click “Update” or “Publish” to save your changes.
Using the Classic Editor (Method 2)
- In the Classic Editor, open the post or page where you want the WooCommerce shortcode to appear.
- Place your cursor in the content area, then type or paste the shortcode (for example, [add_to_cart id=”99″]) directly into the editor.
- When you’re done, click “Update” or “Publish” to save your changes.
If you want more control over your store design, this guide on how to edit WooCommerce shortcodes is the perfect place to begin.
How to Troubleshoot WooCommerce Shortcodes
Although WooCommerce shortcodes make it easier to customize your store, they can occasionally run into issues. Here’s a guide to resolving some of the most frequent shortcode problems:
Shortcodes appearing as plain text
If a shortcode shows up as regular text instead of rendering the expected content:
- Check the syntax: Make sure the shortcode is placed correctly within a shortcode block or content area. Avoid extra HTML tags or line breaks that could interfere.
- Use standard quotes: Only straight quotes (“) should be used; curly quotes (“ ”) can break the shortcode.
- Keep WooCommerce and WordPress updated: Outdated versions might not recognize certain shortcodes.
- Theme conflicts: Temporarily switch to a default WordPress theme. If the shortcode works, your current theme may be the issue—contact the theme developer or consider using a different theme.
- Plugin conflicts: Deactivate all plugins except WooCommerce. If the shortcode functions correctly, reactivate plugins one at a time to identify the culprit. Reach out to plugin support if necessary.
Shortcodes not displaying correctly
Problems can occur on custom pages or posts:
- Placement matters: Avoid putting shortcodes on pages that conflict with default WooCommerce pages like Shop or Checkout. Refer to the official WooCommerce documentation to ensure the shortcode works in your chosen area.
- Reset permalinks: Go to Settings → Permalinks and click Save Changes to refresh the URL structure and resolve potential conflicts.
Products not showing in shortcodes
When product-related shortcodes fail to display items:
- Check product status: Ensure products are set to Published and Public in WooCommerce.
- Confirm categories and tags: If the shortcode filters by category or tag, verify that products are assigned correctly.
- Verify shortcode attributes: Make sure the attributes in your shortcode match the products you want to show.
By following these steps, you can troubleshoot most WooCommerce shortcode issues and ensure your store displays content as intended.
Frequently Asked Questions
1. What are WooCommerce shortcodes?
WooCommerce shortcodes are small pieces of code that allow you to add dynamic content, like products, carts, and checkout pages, anywhere on your WordPress site without coding.
2. How do I insert a WooCommerce shortcode into a page or post?
In Gutenberg, add a Shortcode block and paste your shortcode. In Classic Editor, place your cursor in the content area and type or paste the shortcode. Then click Update or Publish.
3. Can I use multiple shortcodes on the same page?
Yes. Each shortcode should be placed in its own block or line. Be mindful of page load speed if you’re displaying many products or complex layouts.
4. Can shortcodes be used for promotional content?
Absolutely. You can display featured products, best sellers, or specific categories using shortcodes to highlight promotions without modifying the main template.
Conclusion
WooCommerce shortcodes are powerful tools that allow you to customize your online store, display products, manage carts, and create user-friendly pages without writing code. Understanding how to use, troubleshoot, and optimize shortcodes ensures your store functions smoothly and provides an excellent shopping experience.
At Arestós, we specialize in WooCommerce development and customization. Whether you need help setting up your store, creating custom shortcodes, or optimizing your product pages for better user experience and conversion, our expert team can assist you every step of the way.
Ready to take your WooCommerce store to the next level? Contact Arestós today and let us help you build a professional, efficient, and fully customized online store.
Subscribe to our newsletter!
Get updated to
the lastest IT trends