WooCommerce is arguably the most effective and result-oriented platform, enabling users to sell almost anything online. The platform is suitable for selling physical and digital products in bulk quantities worldwide.
Similarly, e-commerce store owners rely on a wide range of WooCommerce shortcodes to create multiple WooCommerce pages and display numerous products anywhere on e-commerce sites without coding or other technical expertise.
This blog post will describe various WooCommerce shortcodes that let you make your e-commerce stores powerful and results-driven in terms of customer retention, conversions, sales, and profitability.
What Are WooCommerce Shortcodes?
WooCommerce shortcodes are usually written in square brackets and help users include content or functionality to their posts and pages accordingly.
Interestingly, you can easily place such valuable shortcodes anywhere in the post editor. This allows you to display the required functionality or content without issues.
Shortcodes allow you to display various content types, such as products, categories, carts, customer accounts, order tracking, checkout pages, and more.
How Can We Use WooCommerce ShortCodes?
You’re mistaken if you perceive the term “How to use shortcode in WooCommerce” as technical. It is not as difficult as you think. Anyone can use them without fuss because you do not require coding expertise.
To use shortcodes in WooCommerce, follow the steps mentioned below:
- Go to the page, post, or widget to add your preferred shortcode.
- Using WordPress, insert the shortcode into any text editor. (If you use Gutenberg or a page builder, like Divi Builder, Elementor, etc., use a ‘Shortcode’ block to enter the shortcode).
WooCommerce Shortcodes List
Product List Shortcodes
Plugin Required | Shortcode Name | Basic Shortcode | Description |
---|---|---|---|
None | Products | [product] | Lists products in a grid layout |
Any Suitable Plugin | Product table | [product_table] | Lists products in a table layout |
None or Any Suitable Plugin | Product category | [product_category category=”clothing”] | Lists products from a specific category |
None | Product categories | [product_categories] | Lists the categories from your store |
None or Any Suitable Plugin | Recent products | [recent_products] | Lists recently added products |
None or Any Suitable Plugin | Featured products | [featured_products] | Lists featured products |
None or Any Suitable Plugin | Best Selling products | [best_selling_products] | Lists most popular products |
None | Sale products | [sale_products] | Lists on-sale products |
None | Top rated products | [top_rated_products] | Lists top-rated products |
None or Any Suitable Plugin | Related products | Lists related products | |
None or Any Suitable Plugin | Product attribute | [product_attribute attribute=”color” terms=”red”] | List products with a certain attribute |
None or Any Suitable Plugin | Product tags | [product_tags] | List product tags (or products by tag) |
WooCommerce Bulk Variations | Bulk variations | [bulk_variations id=”123″] | Displays an order form of variations for a specific product |
WooCommerce Product Filters | Product filters | [product_filters id=”1″] | Displays a group of filters on a product listing page |
Displaying Information About Products
Plugin Required | Shortcode Name | Basic Shortcode | Description |
---|---|---|---|
WooCommerce Quick View Pro | Quick view | [quick_view id=”123″] | Displays quick view buttons for a product |
None | Product page shortcode | [product_page id=”123″] | Inserts the content from a product page |
None or Any Suitable Plugin | Add to cart | [add_to_cart id=”123″] | Displays the add to cart button for a specific product |
None | Product reviews | [product_reviews id=”123″] | Displays the reviews for a specific product |
WooCommerce Page Shortcodes
Plugin Required | Shortcode Name | Basic Shortcode | Description |
---|---|---|---|
None | WooCommerce cart | [woocommerce_cart] | Displays the content of the cart page |
None | WooCommerce checkout | [woocommerce_checkout] | Displays the content of the checkout page |
None | WooCommerce order tracking | [woocommerce_order_tracking] | Displays the content of the cart page |
None | WooCommerce my account | [woocommerce_my_account] | Displays the content of the cart page |
NOTE: You can replace the attribute values according to your data.
WooCommerce Product List Shortcodes
Luckily, you can use various shortcodes to list products differently. You can benefit from WooCommerce shortcodes when listing products on your WordPress site anywhere in a table or grid layout.
WooCommerce Products Shortcode
WooCommerce offers a shortcode that helps users list specific in a grid layout:
[product ids="1,2,3,4,5,6"]
Once you add the shortcode mentioned above to a post or a page, it displays products with IDs 83, 68, 70, 66, 64, and 62. You can also include other parameters in this shortcode, such as the sort order and the number of products per row.
WooCommerce Product Table Shortcode
The built-in WooCommerce products table shortcode is undoubtedly simple and easy to use. The basic shortcode is [product_table], which enables you to create a simple product table.
However, using this shortcode will also require a WooCommerce product table plugin. Here is the detailed shortcode with attributes that use a WooCommerce product table plugin:
[product_table columns="image, name, price, add-to-cart" category="books" filter="true" search_box="true" sort_by="price" sort_order="asc" rows_per_page="14" ]
In this scenario, attributes include columns, category, search box, sort by, sort order, and rows per page.
Product Category Shortcode
Through the product category shortcode, you can easily list products in a grid layout from any particular category:
[product_category category="clothing" per_page="10" columns="6" orderby="default" order="asc" operator="in"]
If you do not want to list the products in a grid layout, you can utilize the WooCommerce product table shortcode.
WooCommerce Product Categories Shortcode
The product categories shortcodes allow users to list their product categories rather than the products within them.
They can use the following shortcode to list their WooCommerce categories ordered by name:
[product_categories orderby="name" order="asc"]
Products by SKU Shortcode
The WooCommerce products by SKU shortcode help users develop a grid of products with particular SKUs (Stock-Keeping Units).
[products_by_sku skus="123,234,345" limit="10"]
Recent Products Shortcode
WooCommerce’s recent product shortcode allows users to show the products they have added recently to their online e-commerce stores. For that reason, they can use the code described below:
[recent_products per_page="6" columns="8" orderby="date" order="asc"]
Featured Products Shortcode
Through the featured products WooCommerce shortcode, users can list featured products exclusively. Here is the shortcode they can easily use:
[featured_products per_page="8" columns="4" orderby="date" order="desc"]
This shortcode lets users display featured products anywhere according to their specific needs.
Best Selling Products Shortcode
If you want to show your best-selling products in a grid format, use the code described below:
[best_selling_products per_page="6" columns="3" orderby="date" order="asc"]
Sale Products Shortcode
This code enables users to display products that are on sale right now. The code is mentioned below:
[sale_products per_page="4" columns="4" orderby="date" order="desc"]
WooCommerce Cart Shortcodes
WooCommerce cart shortcodes help users display customers’ shopping carts on their e-commerce stores. Here is the shortcode provided below:
[woocommerce_cart]
Other Useful WooCommerce Cart Shortcodes
If you want to showcase particular parts of the cart, use the below-mentioned shortcodes:
[woocommerce_cart_contents]
[woocommerce_cart_total before="Total: "]
The first shortcode showcases the user’s cart content in a table, while the other shortcode displays the total price of all cart items. The ‘before’ option helps you decide what text should appear before the total cost.
Apart from this, you can utilize other shortcodes that are described below:
[woocommerce_cart_coupon placeholder="Enter coupon code"]
[woocommerce_cart_shipping before="Shipping: "]
You can use the first shortcode to enter the coupon code field on the WooCommerce checkout and cart page. The ‘placeholder’ parameter helps you modify the text in the coupon code field.
The other shortcode prominently shows your online store’s shopping options. You can customize the text that appears before the options.
WooCommerce Checkout Shortcodes
WooCommerce checkout shortcodes allow users to include the content of the checkout page anywhere on their e-commerce sites. Here is the shortcode described below:
[woocommerce_checkout]
The complete shortcode looks like this:
[woocommerce_checkout order_review="false" terms="false" privacy_policy="true" login_form="false"]
Other Useful WooCommerce Checkout Shortcodes
You can benefit from other WooCommerce shortcodes that help you showcase particular parts of the checkout:
[woocommerce_checkout_fields order="billing,shipping" fields="first_name,last_name,phone,email" required="first_name,email"]
When users want to show specific fields from the WooCommerce checkout, they should use the above-described shortcode. They can also select particular fields that need to be shown.
[woocommerce_checkout_cart show_shipping="false" show_coupon="true" show_cart="false"]-
If you want to showcase the cart contents on the checkout page, use the above-explained shortcode.
[woocommerce_checkout_order_review show_shipping="true" show_coupon="false" show_cart="true"]
This above-described shortcode allows users to insert the order review section from the checkout pages.
WooCommerce Order-Tracking Shortcode
To create an order-tracking page, store owners can benefit from the WooCommerce order-tracking shortcode that is described below:
[woocommerce_order_tracking]
WooCommerce Account Shortcode
Like the WooCommerce order-tracking shortcode, e-commerce store owners can utilize the WooCommerce account shortcode when inserting the account area in various locations throughout their websites.
Here is the WooCommerce account shortcode:
[woocommerce_my_account]
Why Are WooCommerce Shortcodes Crucial?
Shortcodes make the lives of WordPress developers and WooCommerce store owners stress-free. Here are different reasons indicating the importance of using WooCommerce shortcodes:
- They help users save precious time.
- They are simple and easy to use.
- Users can use them without coding expertise.
- They allow users to customize various WooCommerce pages.
What Should We Do If We Can’t Find A Plugin For Our Needs?
If you cannot find the desired shortcode to boost the performance of your online e-commerce store, you should hire a professional WordPress developer to create the shortcode as a plugin.
WPExperts is an outstanding solution as it offers results-driven WordPress plugin development services for small, medium-sized, and large businesses according to their specific requirements.
WooCommerce Shortcodes Reddit
Reddit is one of the leading interactive platforms that helps users share their experiences with others regarding different products and services.
Different users have faced issues while using their desired WooCommerce shortcodes. Likewise, other users have suggested a potential workaround to related issues.
Another user has experienced issues while trying to display the order total amount on the WooCommerce checkout page in a custom payment gateway. They have tried a few shortcodes but to no avail. Luckily, a Redditor has suggested a possible solution.
What to Do If We Want to Install SSL on WooCommerce?
Installing SSL on WooCommerce stores is relatively simple. This exclusive guide will help you follow a few steps to set up the SSL certificate on your WooCommerce store hassle-free.
You can install SSL on WooCommerce in various ways, including:
- Through a CDN provider.
- Using a custom plugin.
- Buying the SSL certificate, and more.
Should We Use the Latest Version of WooCommerce?
You should use the latest version of WooCommerce, WooCommerce 9.0, to avoid various issues when using multiple shortcodes. This way, you can easily access many exciting new and impactful features, enhancing the performance of your e-commerce store to new heights.
Wrapping Up
We hope you liked our blog post describing the significance of WooCommerce shortcodes comprehensively.
WooCommerce shortcodes are helpful when users want to incorporate numerous elements and functionalities into their e-commerce stores.
These impactful shortcodes allow you to easily showcase the right products to the right target audiences and increase conversions, sales, and revenues.