• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WP Desk = premium plugins for WordPress & WooCommerce
  • Plugins
        • Checkout & OrdersMake your work easier and automate the orders. Adjust the order form to your needs and make it more useful to your customers. Print order labels directly from WooCommerce. Put the orders in order using our plugins. Find out how to streamline the procurement process in your store.
          • Flexible Checkout Fields
          • Active Payments
          • Automatic Payment Status
          • Flexible Refund and Return Order
          • Print Orders and Address Labels
          • Flexible Subscriptions Recurring Shipping
          • Flexible Subscriptions Payment Retry
          • Flexible Subscriptions Stock Management
        • ProductsThese plugins will help you manage your WooCommerce products. Here you will find the plugins to import and update products from XML or CSV files. Then you can change the product unit of measure, show the lowest price in the last 30 days (Omnibus Directive), or let customers name the product price!
          • Flexible Product Fields
          • Dropshipping Import Products
          • Dropshipping FTP Import Products
          • Dropshipping Export Products
          • Custom Price
          • WP Desk Omnibus
          • Flexible Quantity Calculator
          • Dropshipping Orders Export
        • MarketingPromote your store online. Add products from your shop to price comparison websites directly from WooCommerce. Acquire new customers and communicate with your existing ones. Build a customer base and communicate with clients using one of the most effective marketing tools, namely e-mail marketing. Check out our promotional tools!
          • Flexible Pricing
          • Flexible Wishlist - Analytics & Emails
          • OLX WooCommerce
          • Flexible PDF Coupons
          • ShopMagic
          • Flexible Invoices
  • Bundle🔥
  • WP Desk Care
  • Support
  • Blog
  • My Account
  • 0

More results

WooCommerce shortcodes & blocks - the complete list with examples

Tech Posts, WooCommerce tutorials

Tomasz Bednarek12 minutes read2025-08-20
blog category heading image

You may find many posts about WooCommerce shortcodes online. In this article, you’ll find the full WooCommerce shortcode list with screenshots. Quickly! I will also show you how to add custom shortcodes in WordPress and WooCommerce for products, shop, login, cart, and checkout to name a few.

Contents

  • WooCommerce shortcodes - Basics
    • What are the WooCommerce shortcodes?
    • Where to use WooCommerce shortcodes?
    • How to add WooCommerce shortcodes?
    • Why use WooCommerce shortcodes?
    • What shortcodes can I find in WooCommerce?
  • WooCommerce shortcodes list
  • WooCommerce Cart & Checkout shortcodes
    • woocommerce_cart
    • add_to_cart
    • add_to_cart_url
    • woocommerce_checkout
  • General shortcodes
    • shop_messages
    • woocommerce_my_account
    • woocommerce_order_tracking
  • WooCommerce Product shortcodes
    • product
    • product_page
    • product_attribute
  • WooCommerce Products shortcodes
    • products
    • sale_products
    • best_selling_products
    • recent_products
    • top_rated_products
    • related_products
    • featured_products
  • WooCommerce Product Category shortcodes
    • product_categories
    • product_category
  • Bonus 1: WooCommerce Gutenberg blocks 🚀
    • WooCommerce Blocks in the Gutenberg list
  • Bonus 2: WordPress shortcodes 🙂
    • WordPress shortcodes list
  • Common issues & compatible WooCommerce plugins
    • WooCommerce shortcodes do not work - troubleshooting
  • Custom shortcodes in WordPress and WooCommerce
  • WooCommerce shortcodes summary (& free plugins)
    • Related Articles
  • 5 essential WooCommerce tips to boost your sales
  • How to change the WooCommerce shop page (options & customization)
  • WooCommerce Products - The basics of e-commerce product management
  • Professional WordPress design and development (learning, tools & plugins)
  • WooCommerce Checkout - Settings, Shortcode & Configuration Guide

WooCommerce shortcodes - Basics

What are the WooCommerce shortcodes?

In short, they are shortcuts that let you add something without touching PHP code 😨!

When you don't use WooCommerce shortcodes - PHP code example

Some WooCommerce shortcodes in fact work right after the plugin is installed. These shortcodes generate cart, checkout, and my account on the default WooCommerce pages.

Also, many WooCommerce shortcodes have additional shortcode parameters (attributes) to customize the output. Thus, advanced shortcode customization will not require hiring a developer.

It’s worth adding that many plugins have their unique shortcodes. Knowing how to use them will help you run your WordPress and WooCommerce effectively 😀.

Where to use WooCommerce shortcodes?

You just need to add the specific shortcode name inside the Gutenberg Shortcode block.

Add a WooCommerce shortcode in the Gutenberg editor

With Classic Editor 💪, it’s even simpler 😉.

Add a WooCommerce shortcode in the Classic editor

In some shortcodes, you may use parameters, in some you insert the content between the opening and closing tags of the shortcode. Later, I’ll show you how to create custom shortcodes in WordPress and WooCommerce ⭐.

How to add WooCommerce shortcodes?

You don't need special plugins to add a shortcode. The plain post/ page editor will suffice.

  1. Edit a page or a post
  2. Add a WordPress or WooCommerce shortode inside []
  3. Update the changes and check the page in the browser
  4. If you can't see any effects, you may start troubleshooting

Of course, such a plugin may help in shortcode management or see the available shortcodes in WooCommerce.

Why use WooCommerce shortcodes?

They will save you a lot of time! And you can customize posts and pages. For example, you may create landing pages with a specific layout, products, advanced category or product view, login form, or even checkout 🚀.

Custom page created with WooCommerce shortcodes

I have used the Gutenberg editor to add 2 shortcodes (just names) but also a classical one to show you the [] for the WooCommerce shortcodes. And these 3 little shortcodes did the job 🙂.

A custom page with WooCommerce shortcodes

It was super easy 😀.

What shortcodes can I find in WooCommerce?

WooCommerce comes with built-in shortcodes that you can use right after installing the plugin. Most WooCommerce shortcodes help generate products, product information, or specific functionality of the store quickly.

After the installation (if you let the WooCommerce creator do its job), you will get 3 pages (Cart, Checkout, and My Account) with appropriate shortcodes for each functionality.

WooCommerce page setup - cart, checkout, my account pages

Of course, you can change default pages for Cart, Checkout, or My Account but remember to add corresponding WooCommerce shortcodes so they work properly. It’s quite simple 😀

WooCommerce cart page - default content

Ok, so let’s jump right into these WooCommerce shortcodes to learn how to use them 🚀.

WooCommerce shortcodes list

  1. WooCommerce Cart & Checkout shortcodes
    • woocommerce_cart
    • add_to_cart
    • add_to_cart_url
    • woocommerce_checkout
  2. WooCommerce General shortcodes
    • shop_messages
    • woocommerce_my_account
    • woocommerce_order_tracking
  3. WooCommerce Product shortcodes
    • product
    • product_page
    • product_attribute
  4. WooCommerce Products shortcodes
    • products
    • sale_products
    • best_selling_products
    • recent_products
    • top_rated_products
    • related_products
    • featured_products
  5. WooCommerce Product Category shortcodes
    • product_categories
    • product_category
  6. Bonus 1: WooCommerce Gutenberg blocks - alternative to shortcodes? 🚀
  7. Bonus 2: WordPress shortcodes 🙂

There are many types of WooCommerce shortcodes - for products, shop, cart, checkout, login, and My Account pages. The below shortcode examples give some insight into their possible usage.

WooCommerce Cart & Checkout shortcodes

Apart from the default WooCommerce cart & checkout pages (set in WooCommerce → Settings → Advanced → Page setup), you may use the appropriate shortcodes on other pages and posts.

woocommerce_cart

The shortcode simply adds a WooCommerce cart with cart content, a place for a discount coupon, and the Update cart button. No additional arguments.

woocommerce_cart shortcode on a single page

add_to_cart

WooCommerce lets you use the add_to_cart shortcode to place the Add to Cart button on a single post or page.

WooCommerce add_to_cart shortcode

The shortcode may get arguments. In my example, I used:

add_to_cart id="46" show_price="true" style="border:10px solid blue; padding: 20px;" sku="alternative-to-id" class="css-class" quantity="1"

Of course, remember about the opening and closing [] 🙂.

💡 Hint: If you use this shortcode and woocommerce_cart on the same page, after adding a product to the cart, you will not see the View Cart button as the changes will affect the cart directly.

add_to_cart_url

This shortcode takes only two arguments (id or sku) and gives you the URL on the Add to Cart button of a specific product (id or sku).

WooCommerce add_to_cart_url shortcode

woocommerce_checkout

This is one of the most important WooCommere shortcodes 💪. It generates the same WooCommerce checkout form, as you know from the WooCommerce Checkout page.

woocommerce_checkout shortcode on a single page

💡 Important: If you let customers add products on the same page, remember that the checkout content requires the page refresh to show you the current checkout content. But, you may also add a cart in this case to see the changes instantly 🙂.

To create custom checkout forms in WooCommerce, you may use a free checkout customizer.

General shortcodes

These are additional WooCommerce shortcodes you may want to use to customize a store.

shop_messages

You may use the first one to show the store messages on non-WooCommerce pages (according to WooCommerce). For example, when you create custom product lists or use the add_to_cart shortcode so that your customer can see the notifications right away 🎉.

woocommerce_my_account

The second general shortcode will generate the WooCommerce My Account page. It’s useful to show customers previous orders and let them manage their accounts.

woocommerce_my_account shortcode to show the user account

💡 You may read more about the woocommerce_my_account shortcode, My Account page settings, and how to add custom fields to it.

woocommerce_order_tracking

Finally, this shortcode lets your customers track their orders by inserting the order number and email address. WooCommerce order tracking can be a useful feature for users that may reduce support workload.

woocommerce_order_tracking - let customers track their orders

WooCommerce Product shortcodes

WooCommerce also comes with many shortcodes for displaying products. Thus, creating a post or page with specific products and a customized layout is a breeze 🌬️.

First, I will show you how to use single-product shortcodes, then I will move to ones for displaying more WooCommerce products. Let’s dive in 🙂!

💡Hint before we start. Where can you find the product ID or SKU?

The product ID is visible on the product edit screen (inside the URL, for example, wp-admin/post.php?post=46&action=edit). Note: I will use this ID in my shortcodes below 😀. You see the ID when you hover over the product on the WooCommerce product list too.

Get the WooCommerce product ID

You may find the SKU next to the product ID and before the product quantity. In my example, 12341234. If you don’t see the column for the product SKU, enable it in the Screen Options.

Screen Options for WooCommerce products

You may also find the product SKU in the Edit Product screen → Product data → Inventory → SKU 🙂.

Ok, let’s move on to the WooCommerce shortcodes for displaying products!

product

This shortcode looks very simple, yet it’s quite powerful. It shows one product with basic information (name, image, review stars, price, Add to Cart button) so you may point to a specific product fast ⭐.

💡 Important: It’s working but I have not found WooCommerce documentation about it. I recommend using the next ones to retrieve products, but this one worked (with 3 possible attributes): id="46" columns="1" class="css_class" (there is also sku="alternative-to-id").

WooCommerce Single Product shortcode

product_page

To get the full product page inside a post/page you can use this shortcode. It will generate the complete product page with a description, additional information, price, related products, etc.

product_page WooCommerce shortcode to generate a product page

It’s a nice option for blog posts or LPs where you first want to “prepare the ground” before pointing to a specific product to buy 🙂.

💡 Hint: Of course, you may use this shortcode multiple times on the same page. The shortcode gets two attributes e.g. id="46" or sku="alternative-to-id" 🚀!

product_attribute

This shortcode came in older WooCommerce (before 3.2) but it still works (as of the end of 2023 🙂). It will get all products with a given attribute (this is an argument), for example, attribute="size".

product_attribute WooCommerce shortcode

The new products shortcode with attribute="size" took the necessity of using the separate product_attribute shortcode so you may use it instead 👍.

WooCommerce Products shortcodes

Let’s see the most athletic WooCommerce shortcodes 💪, that will help you create beautiful page/post layouts 🎨 and shoot for higher conversion rates 🙂.

products

This shortcode comes with dozens of options and arguments 😮!

What the products shortcode does is display products on a page, post, in sidebar, or text widget where you placed the shortcode. Easy, right? The hard part is to use the shortcode attributes wisely 😀. Without them, the shortcode will show all products in your store!

💡 Hint: You can use the products shortcode several times on the same page/post 👍. That will help you build customized posts or LPs with specific products based on the shortcode attributes.

The products shortcode’s attributes

Let’s see these attributes first.

  • limit - it’s self-explanatory 🙂 By default, it’s limit="-1" so all products that meet other criteria will be displayed.
  • columns - decide in how many columns you want to show your products. The default value is 4.
  • ids - display products with specific ids (comma-separated).
  • skus - product SKUs separated by a comma.
  • visibility - decide whether to show visible (default value - products visible both on shop and search results), catalog (visible on shop only), search (visible on search results only), hidden (from shop or search results but accessible via URL), or featured (marked as Featured) products. The results will get products with specific visibility - you can set it for each product.

    WooCommerce product visibility

  • on_sale - show on sale products (use: on_sale="true"). This attribute should not be used together with best_selling or top_rated arguments. WooCommerce does not recommend using this argument together with ids, skus, attribute, terms, terms_operator, tag, tag_operator, category, cat_operator, and visibility.
  • best_selling - show best selling products (use: best_selling="true"). This argument should not be used together with on_sale or top_rated. WooCommerce does not recommend using this argument together with ids, skus, attribute, terms, terms_operator, tag, tag_operator, category, cat_operator, and visibility.
  • top_rated - show top rated products (use: top_rated="true"). This argument should not be used together with on_sale or best_selling.
  • paginate - paginate="true" will turn on pagination for products based on the limit. It’s disabled by default (paginate="false").
  • orderby - choose the way to sort your products. You may choose one or multiple values (separated by space) from the list: title (by default), date (when the product was published), id (by the post ID of the product), menu_order (the lower the Menu Order number the higher the product will appear), popularity (by the number of purchases), rand (randomly show products, but may not work well with cache), and rating (by average product rating). For example, orderby="title rating" will sort products by title and their ratings.
  • order - set the order type (ASCending or DESCending) for a given orderby values, for example, order="ASC" (default value).
  • class - give the product container (div) a specific CSS class for further styling and customization.
  • attribute - show products with a specific attribute slug, for example, attribute="size".
  • terms - give a list of attribute (above) terms (comma-separated or one term) to modify the products you want to show your customers, for example, terms="Large, Medium" will show products with size attribute (large or medium).
  • terms_operator - decide about the way terms impact the product search. By default, the terms_operator takes the IN value so the product should have at least one of the given attribute’s terms. You may also choose AND (the product should have all values of the attribute), or NOT IN (self-explanatory) values.
  • tag - show products from inserted tags (comma-separated).
  • tag_operator - it works the same for the product tag as terms_operator for the product attribute. The argument gets the IN (default), AND, and NOT IN values.
  • category - show products from a given category/categories separated by a comma.
  • cat_operator - it works the same for the product category as terms_operator for the product attribute or tag_operator for the product tag 🙂. The argument gets the same 3 values: IN (default), AND, and NOT IN.
See the full list of the product/ products shortcodes' attributes with more examples.

The WooCommerce products shortcode - how-to-use ideas

Let’s see now some examples of using the products shortcode in your posts, pages, sidebars, or text widgets.

First, you may type the shortcode (with [] 🙂): products category="food" cat_operator="NOT IN" orderby="rating" order="DESC" limit="4" columns="2":

Products shortcode to show customized WooCommerce products on a post or page

Next, let’s show 8 best selling products from the food category in 4 columns with the products shortcode: products category="food" best_selling="true" limit="8" columns="4":

Best selling products in WooCommerce - products shortcode example

Finally, let’s display all products with pagination after 4 products and 2 columns based on the title and popularity: products limit="4" paginate="true" columns="2" orderby="title popularity":

WooCommerce products with pagination based on a custom shortcode

I encourage you to test the products shortcode in your WooCommerce to create beautiful layouts and engaging content ⭐🙂🎉!

sale_products

💡 Hint: This WooCommerce shortcode (and the following 5 shortcodes) came before the products shortcode (that took everything under its hood) 💪! Even as they still work, try to use the previous one (products).

The sale_products shortcode will show WooCommerce products on sale 🏷️ . For example, you can use it with the limit and columns arguments to get the interesting result:

Sale_products shortcode to display WooCommerce products on sale

best_selling_products

Similarly, this shortcode was introduced before WooCommerce 3.2, and you may use the products shortcode now. If you decide to use the older best_selling_products you will receive products with most purchases. So it works like the best_selling argument for the products shortcode 🪙.

best_selling_products - one of the WooCommerce shortcodes

recent_products

The older WooCommerce also gave us the recent_products shortcode that works similarly to the orderby="date" argument for the new products shortcode. You may also use columns or limit the results, it works quite fast 💨.

Recent WooCommerce products

top_rated_products

You can show WooCommerce products with the best ratings (similar to orderby="rating" in the products shortcode) using, for example, top_rated_products columns="2" limit="4" ⭐.

Show top rated products using a WooCommerce shortcode

related_products

This shortcode generates the related products (use the limit, orderby="title", and columns args to customize it) on a single product page. Currently, WooCommerce shows the Related Products in a separate section, but, of course, you may use the old one (or the products shortcode) 🙂.

Related products - new sections with a shortcode

featured_products

Featured products are selected products you want your customers to focus on.

Featured products in WooCommerce

It’s also possible to show the featured products on a single post or page using the older featured_products shortcode (or the new products visibility="featured" shortcode) ⭐.

Show featured products in WooCommerce with a shortcode

WooCommerce Product Category shortcodes

Finally, we have two powerful 💪 WooCommerce shortcodes to show products by category and product categories!

In my opinion, they are very useful for creating general-level information about products in your store, for example, pointing to WooCommerce product categories.

product_categories

This shortcode generates the category list (with images) based on arguments. Hint: you can set the category image and description in Products → Categories → Edit category ⚙️. I set one column in my example.

Product categories in WooCommerce

The shortcode can also get additional attributes that can help get customized results 👍:

  • ids - choose the specific categories using the category id (tag_ID visible when you hover over a category in Products → Categories.
  • limit - the number of categories.
  • columns - to display (4 by default).
  • hide_empty - 1 by default, set to 0 to show all categories including empty ones.
  • parent - it’s an interesting argument. You may set it to 0 to show only top-level categories. Also, you can set it to a specific category ID to show its subcategories (child categories).
  • orderby - set the sorting method: name (by default), id, slug, menu_order, or include (if you specified the ids for categories).
  • order - set to ASC (default) or DESC to choose the category ordering.

product_category

Last, but not least 🙂 is product_category - one of the most interesting WooCommerce shortcodes. It works as if you use the category="" argument in the products shortcode. The advantage of this one is that you focus on a specific product category.

The shortcode gets the following attributes:

  • category - choose the specific category; you may use the category name, ID, or its slug.
  • limit - the number of products.
  • columns - to display (4 by default).
  • orderby - choose the way to sort your products. The argument’s values are similar to the ones in the products shortcode. You may choose one or multiple values (separated by space) from the list: title (by default), date (when the product was published), id (by the post ID of the product), menu_order (the lower the Menu Order number the higher the product will appear), popularity (by the number of purchases), rand (randomly show products, but may not work well with cache), and rating (by average product rating).
  • order - set the order type: ASC (default) or DESC for the products ordering.

The last example from the WooCommerce shortcodes 😀 with product_category category="Food" limit="5" columns="5" orderby="rating":

product_category - a WooCommerce shortcode example

You may test the WooCommerce shortcodes with their arguments and customize your store!

Bonus 1: WooCommerce Gutenberg blocks 🚀

WooCommerce integrated hugely with the Gutenberg editor giving you A LOT of pre-built blocks for your posts and pages ⭐. Sometimes, you may treat them as faster shortcodes as you just choose them from the list with a few clicks (no need to insert any shortcode parameters)😀.

WooCommerce Blocks - alternative to shortcodes

💡 Important: WooCommerce blocks require WordPress 6.4+ and WooCommerce 8.3+ ❕

Use the list to find ideas for your store and content creation process. I included blocks that generate content with existing products, categories, etc. (with screenshots 🎉).

💡 Note: I haven’t listed some of WooCommerce blocks deliberately, for example, banners, or hero product elements that are only graphical blocks where you need to insert the actual product image, link, and content (thus it’s not made automatically for you). I focused on the WooCommerce blocks that will speed up working with the real product data 🙂.

Each WooCommerce block gives you functionality with an interesting layout. Try to insert each name to test them. In my opinion, Gutenberg blocks may be a great (and faster) alternative to WooCommerce shortcodes 💪! I’ll show you screenshots of my favorites 🙂!

💡 Hint: You can use WooCommerce shortcodes and blocks together and you will see a block preview (like in my examples below) after choosing one!

Here comes the alphabetical list of selected blocks in the post/ page editor ⭐.

WooCommerce Blocks in the Gutenberg list

  • Active Filters
  • All Products
    All Products Block
  • All Reviews
  • Best Selling Products
  • Cart
    Cart - WooCommerce Blocks example
  • Checkout
    Checkout - WooCommerce Blocks example
  • Classic Cart
  • Classic Checkout
  • Customer Account
  • Featured Category
  • Featured Product
  • Featured Products 2 Columns
  • Featured Products: 5 Columns
  • Filter by Attribute
  • Filter by Price
  • Filter by Rating
  • Filter by Stock
  • Hand-picked Products
  • Large Image Product Gallery
  • Mini-Cart
  • Minimal Product List
  • Newest Products
  • On Sale Products
  • Product categories
  • Product Categories List
  • Product Collection (Beta)
  • Product Collection Newest Arrivals
  • Product Collection Rows
  • Product Collection Simple Grid
  • Product Details Product Listing
  • Product Filters
  • Product Gallery
  • Product Hero
  • Product List with Full Product Description
  • Product List with 1:1 Images
  • Product Price
  • Product Search
    Search block for WooCommerce products in Gutenberg
  • Product Summary
  • Product tags
  • Product Title
  • Products (Beta)
  • Products by Attribute
    Products by Attribute block
  • Products by Category
  • Products by Tag (useful & similar to Products by Attribute)
  • Reviews by Category
    Reviews by Category block
  • Reviews by Product
  • Shop by Price
    Shop by Price block
  • Single Product
    Single Product block
  • Top Rated Products
  • 4-Column Product Row

As you can see, some blocks can help you in showing products faster. There are also blocks with a new cart and checkout (a nice alternative to the default ones we get with WooCommerce shortcodes).

💡 Read more in the WooCommerce blocks documentation.

Bonus 2: WordPress shortcodes 🙂

WordPress lets you use the additional 6 shortcodes since Version 2.5. They are mainly shortcuts to get some media elements inside your posts or pages.

I have listed them here so that you know they exist - if you’d like to further customize your posts and pages beyond WooCommerce shortcodes and blocks 🚀.

Read more about WordPress blocks and how to use them in the WordPress documentation 📄.

WordPress shortcodes list

  • audio
  • caption
  • embed
  • gallery
  • playlist
  • video

Common issues & compatible WooCommerce plugins

There are 4 main reasons why shortcodes are not working properly 🙁. Let’s find out why.

WooCommerce shortcodes do not work - troubleshooting

I encourage you to make a backup and troubleshoot on a staging environment (or a copy of your store). Updating your WordPress and WooCommerce may also help if you’ve not done that for a while 🙂.
  1. First, you may have put your shortcode name with a space after the opening [ or closing ].
  2. Next, the shortcode may be in the < pre > or < code > HTML tags (here with additional spaces).
  3. Check out if the “ character you use to declare the shortcode’s arguments (a.k.a. attrs or attributes) is like this attr="value" and not this attr=“value”.
  4. Finally, the shortcode may have encountered conflict with other plugins or your theme. To troubleshoot that possibility try to use the shortcode with WooCommerce only, and a default theme recommended by WooCommerce e.g. Storefront.
  5. Plugin compatibility check. If you install new plugins or a theme, try if the WooCommerce shortcodes work properly with them. If not, please contact the theme or plugin’s authors for assistance.

WooCommerce plugins

💡 Hint: Throughout my examples of using WooCommerce shortcodes, you may have noticed additional information about the product (lowest price, add to wishlist, custom fields, etc.) 🙂.

I will show you a few of our plugins that will integrate with WooCommerce shortcodes so that you can use their functionality calmly 😎.

You may check out WP Desk:

  • free plugins for WordPress and WooCommerce
  • premium plugins with advanced features and support

You can also try plugins in a free demo or contact us for more details 🙂.

💡 Hint: may also buy our premium plugins in the All Plugins Bundle 🎉.

Custom shortcodes in WordPress and WooCommerce

Many plugins and themes add their own shortcodes or let you customize them. The most common uses for them are banners, forms, messages, and special features for your site 💪.

💡 Hint: Did you know that It’s also possible to add custom shortcodes with a few lines of code (PHP)? WooCommerce and WordPress shortcodes do not limit you.

You may add your shortcode with a custom plugin or directly to the theme’s functions.php file (in this case, remember to check the file after you update or change your theme) 🙂.

How to add custom shortcodes in WordPress and WooCommerce

After using the shortcode in a post, visitors will see the new box with styling.

Custom shortcode in a WordPress post

Custom shortcodes ideas

  • Infobox
  • Contact info
  • Affiliate/ UTM helper
  • Function execution
  • and more

You may also decide you need a WooCommerce shortcodes plugin to help you with the task.

In case you want to try on your own 💪 see the WordPress developer guide on how to add custom shortcodes in WordPress & WooCommerce.

WooCommerce shortcodes summary (& free plugins)

Today, you’ve seen A LOT of WooCommerce shortcodes, Gutenberg blocks, and how to use them in your WordPress to give your store a boost 🚀. I have also shown you some issues and how to troubleshoot them.

Then, you’ve met some of our plugins that are beautifully compatible with WooCommerce shortcodes 😀.

Also, you’ve learned about different types of WooCommerce shortcodes (for the cart, checkout, products, login, or shop pages). You could've seen many practical examples with screenshots of how to add and use custom shortcodes in WordPress and WooCommerce 💪. We’ve come to the final words 🎉!

I encourage you to try WooCommerce shortcodes & blocks. Also, check out our premium extensions here but also free plugins in the WordPress repository (link below). If you have any questions let us know 🙂!

You may also check out free plugins for WordPress and WooCommerce 🚀!

Related Articles

WooCommerce tips

5 essential WooCommerce tips to boost your sales

Do you need valuable WooCommerce tips and tricks to boost your sales? I'll give you 5 most essential WooCommerce tips and tricks. If you follow them, ...
How to change the WooCommerce shop page (options and customization)

How to change the WooCommerce shop page (options & customization)

Being one of the standard WooCommerce pages, the shop page can come with additional settings. In this article, you may read about the WooCommerce shop...
WooCommerce product manager plugin guide

WooCommerce Products - The basics of e-commerce product management

Launching and running a WooCommerce shop is very simple in the long-term perspective. The beginnings are difficult in any field. To make a start easy ...
Professional WordPress design and development (learning, tools & plugins)

Professional WordPress design and development (learning, tools & plugins)

You can find a lot of books about professional WordPress design and development. There are also courses, videos, and tutorials on how to excel in desi...
woocommerce_checkout shortcode and WooCommerce checkout settings

WooCommerce Checkout - Settings, Shortcode & Configuration Guide

WooCommerce checkout features - which are mostly related to payment settings - play a vital role in running an online store. It's often thanks to them...

12 minutes read51159 views

Reader Interactions

Comments

  1. ShareSoft Technology says

    2023-12-15 at 12:02

    WooCommerce impresses with its seamless functionality and user-friendly interface. Running my online store is a breeze, thanks to its powerful features and customizable options for a standout e-commerce experience
    https://www.sharesoft.in/product/dynamic-pricing-and-discount-product/

  2. ShareSoft Technology says

    2024-01-15 at 11:40

    WooCommerce impresses with its seamless functionality and user-friendly interface. Running my online store is a breeze, thanks to its powerful features and customizable options for a standout e-commerce experience https://www.sharesoft.in/product/dynamic-pricing-and-discount-product/

Tomasz Bednarek

Copywriter and Marketing Specialist

Author of numerous articles and educational materials created for WP Desk and related services focused on WooCommerce plugins (Flexible Invoices, F...

Powered by WP Desk

WP Desk brings you great WooCommerce plugins. We strive to save your time and money by speeding up your processes. Use our plugins to build a better store. Awesome support included in the package.

Premium WooCommerce Plugins →
WP Desk › Blog › WooCommerce tutorials › WooCommerce shortcodes & blocks - the complete list with examples

Primary Sidebar

Contents

  • WooCommerce shortcodes – Basics
    • What are the WooCommerce shortcodes?
    • Where to use WooCommerce shortcodes?
    • How to add WooCommerce shortcodes?
    • Why use WooCommerce shortcodes?
    • What shortcodes can I find in WooCommerce?
  • WooCommerce shortcodes list
  • WooCommerce Cart & Checkout shortcodes
    • woocommerce_cart
    • add_to_cart
    • add_to_cart_url
    • woocommerce_checkout
  • General shortcodes
    • shop_messages
    • woocommerce_my_account
    • woocommerce_order_tracking
  • WooCommerce Product shortcodes
    • product
    • product_page
    • product_attribute
  • WooCommerce Products shortcodes
    • products
    • sale_products
    • best_selling_products
    • recent_products
    • top_rated_products
    • related_products
    • featured_products
  • WooCommerce Product Category shortcodes
    • product_categories
    • product_category
  • Bonus 1: WooCommerce Gutenberg blocks 🚀
    • WooCommerce Blocks in the Gutenberg list
  • Bonus 2: WordPress shortcodes 🙂
    • WordPress shortcodes list
  • Common issues & compatible WooCommerce plugins
    • WooCommerce shortcodes do not work – troubleshooting
  • Custom shortcodes in WordPress and WooCommerce
  • WooCommerce shortcodes summary (& free plugins)

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

Footer

WP Desk - WooCommerce Plugins

At WP Desk we create great WooCommerce plugins with awesome support. Save time and money with our e-commerce solutions. See how we can help you improve your e-store →

Secured by Comodo

WP Desk

  • About us
  • Giving Back
  • Blog
  • Get Support
  • Contact us

Products

  • Premium Plugins
  • WP Desk Care
  • Documentation
  • WooCommerce Invoices
  • Email Marketing
  • PDF Coupons

Legal

  • Terms & Conditions
  • Refund Policy
  • Support Policy
  • Privacy Policy

© 2026 WP Desk

We value your privacy

We use necessary cookies to make our site work. We'd also like to set additional cookies to understand site usage, enhance your browsing experience, and serve personalized ads or content. By clicking ‘Accept All,’ you consent to our use of additional cookies.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}