{"id":48040,"date":"2023-11-08T09:00:00","date_gmt":"2023-11-08T09:00:00","guid":{"rendered":"https:\/\/www.bluehost.com\/blog\/?p=48040"},"modified":"2025-05-29T06:27:30","modified_gmt":"2025-05-29T06:27:30","slug":"woocommerce-shortcodes","status":"publish","type":"post","link":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/","title":{"rendered":"WooCommerce Shortcodes: A Comprehensive Guide"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"h-key-highlights\">Key highlights\u00a0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Easy customization \u2013 Add <a href=\"https:\/\/www.bluehost.com\/blog\/static-vs-dynamic-websites\/\">dynamic WooCommerce elements<\/a> without coding.&nbsp;<\/li>\n\n\n\n<li>Quick setup \u2013 Copy and paste <a href=\"https:\/\/www.bluehost.com\/blog\/what-is-wordpress-shortcode\/\">shortcodes<\/a> into pages effortlessly.&nbsp;<\/li>\n\n\n\n<li>Flexible product display \u2013 Showcase featured, recent or category-specific products.&nbsp;<\/li>\n\n\n\n<li>Better user experience \u2013 Enhance navigation with order tracking and cart buttons.&nbsp;<\/li>\n\n\n\n<li>Simple troubleshooting \u2013 Fix common errors with basic syntax checks.&nbsp;<\/li>\n\n\n\n<li>Alternative options \u2013 Use WooCommerce blocks or plugins for more customization.&nbsp;<\/li>\n\n\n\n<li>Hosting matters \u2013 A reliable host like Bluehost ensures smooth performance.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-introduction\">Introduction<\/h2>\n\n\n\n<p>As one of the most popular eCommerce platforms in the world, WooCommerce offers a wide range of features that allow you to sell products and services online.&nbsp;<\/p>\n\n\n\n<p>But did you know there\u2019s a feature that can help you get even more out of your eCommerce shop?&nbsp;<\/p>\n\n\n\n<p>We\u2019re talking about shortcodes.&nbsp;<\/p>\n\n\n\n<p>If you\u2019re unfamiliar with them, there\u2019s no need to worry. We\u2019ll explain what they are and how to use them to optimize your online shop. In addition, we\u2019ll explore effective ways to resolve shortcode errors.&nbsp;<\/p>\n\n\n\n<p>Ready to learn all about WooCommerce shortcodes? Let\u2019s dive in.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-are-woocommerce-shortcodes\">What are WooCommerce shortcodes?<\/h2>\n\n\n\n<p>WooCommerce shortcodes are <a href=\"https:\/\/www.bluehost.com\/wordpress\/wordpress-hosting\">WordPress<\/a> code snippets that perform a specific function on your website.\u00a0 These pieces of code come with pre-defined functionality and were created specifically for WooCommerce.<\/p>\n\n\n\n<p>All shortcodes have the same structure \u2014 short texts in square brackets. If multiple texts are used, they\u2019ll be linked together with underscores and commas. Once you understand the syntax or the handler function, you can start adding shortcodes to your website pages.<\/p>\n\n\n\n<p>WooCommerce shortcodes can be used with parameters or arguments (args), which enable you to customize your website even further. A parameter is the attribute being adjusted by a shortcode, while an argument is the value assigned to that attribute.<\/p>\n\n\n\n<p>For instance, if you\u2019re using a product shortcode, you can set the number of products to be displayed (i.e., parameter) and the number of columns you want (i.e., argument).<\/p>\n\n\n\n<p>Here\u2019s a glance at the parameters and arguments in a WooCommerce shortcode:<\/p>\n\n\n\n<p><strong>[related_products limit=&#8221;4&#8243;]<\/strong><\/p>\n\n\n\n<p>In this example, \u201climit\u201d is the parameter, while \u201c4\u201d is the argument. Parameters allow you to modify shortcodes so they can function in different ways as per your needs or requirements. However, not all WooCommerce shortcodes use parameters.<s><\/s><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-should-you-use-woocommerce-shortcodes\"><a><\/a>Why should you use WooCommerce shortcodes?<\/h2>\n\n\n\n<p>WooCommerce shortcodes allow you to customize your eCommerce shop by adding various features to your posts and pages without any coding experience. By using pre-existing code, you can save a significant amount of time that would have been spent on <a href=\"https:\/\/www.bluehost.com\/blog\/6-essential-steps-to-success-for-learning-how-to-code\/\">writing your own code<\/a>.<\/p>\n\n\n\n<p>Shortcodes offer a quick and convenient way to <a href=\"https:\/\/www.bluehost.com\/blog\/conversion-rate-optimization\/\">enhance your website\u2019s design<\/a> for more conversions. These code snippets enable you to create a superior shopping experience and differentiate your brand from competitors.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-use-woocommerce-shortcodes\">How to use WooCommerce shortcodes<\/h2>\n\n\n\n<p>Now that you know what WooCommerce shortcodes are and why they\u2019re important, let\u2019s explore how to use them. Adding shortcodes to your WooCommerce store is pretty straightforward, even if you have no coding knowledge.<\/p>\n\n\n\n<p>However, before making any changes to your website, it\u2019s best to back up your data. This way, you can restore your website to its previous state if anything goes wrong.<\/p>\n\n\n\n<p>If you\u2019re using the <a href=\"https:\/\/wordpress.org\/plugins\/classic-editor\/\" target=\"_blank\" rel=\"noreferrer noopener\">Classic Editor<\/a>, you only need to copy and paste your chosen shortcode on the desired page.<\/p>\n\n\n\n<p>On the other hand, the <a href=\"https:\/\/www.bluehost.com\/blog\/how-to-use-the-new-wordpress-gutenberg-block-editor\/\">Gutenberg block editor<\/a> requires you to add the shortcode to a shortcode block. In this tutorial, we\u2019ll show you how to add shortcodes to your WordPress website using the Gutenberg editor.<\/p>\n\n\n\n<p>Let\u2019s get started:<\/p>\n\n\n\n<ol start=\"1\" style=\"list-style-type:1\" class=\"wp-block-list\">\n<li>Log in to your WordPress dashboard.<\/li>\n\n\n\n<li>Go to &#8216;Pages&#8217;, which is located on the left-hand menu, and select &#8216;Add New&#8217;. Note that you can use a new or existing page.<\/li>\n\n\n\n<li>Click the &#8216;black plus icon&#8217; (+) to create a block.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"677\" src=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block.png\" alt=\"Click the plus icon to create a new shortcode block.\" class=\"wp-image-48042\" srcset=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block.png 1600w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block-300x127.png 300w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block-1024x433.png 1024w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block-768x325.png 768w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block-1536x650.png 1536w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block-24x10.png 24w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block-36x15.png 36w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/create-new-shortcode-block-48x20.png 48w\" sizes=\"100vw\" \/><\/figure>\n\n\n\n<ol start=\"4\" style=\"list-style-type:1\" class=\"wp-block-list\">\n<li>Once you\u2019ve clicked the plus icon, you\u2019ll see the shortcode block. Click on it to add it to the editor. Alternatively, type [\/] on the page and search for \u201cshortcode.\u201d<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"669\" src=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg.png\" alt=\"Add the shortcode block to the Gutenberg editor.\" class=\"wp-image-48043\" srcset=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg.png 1600w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg-300x125.png 300w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg-1024x428.png 1024w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg-768x321.png 768w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg-1536x642.png 1536w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg-24x10.png 24w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg-36x15.png 36w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/add-shortcode-block-Gutenberg-48x20.png 48w\" sizes=\"100vw\" \/><\/figure>\n\n\n\n<ol start=\"5\" style=\"list-style-type:1\" class=\"wp-block-list\">\n<li>Type or paste your desired shortcode in the field provided.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1600\" height=\"674\" src=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode.png\" alt=\"Enter a shortcode in the provided field.\" class=\"wp-image-48044\" srcset=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode.png 1600w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode-300x126.png 300w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode-1024x431.png 1024w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode-768x324.png 768w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode-1536x647.png 1536w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode-24x10.png 24w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode-36x15.png 36w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/enter-shortcode-48x20.png 48w\" sizes=\"100vw\" \/><\/figure>\n\n\n\n<ol start=\"6\" style=\"list-style-type:1\" class=\"wp-block-list\">\n<li>Preview the page to make sure everything looks good.<\/li>\n\n\n\n<li>Click on the &#8216;Publish&#8217;<strong> <\/strong>button at the top right corner of the page.<\/li>\n<\/ol>\n\n\n\n<p>That\u2019s it! You\u2019ve successfully added a WooCommerce shortcode to your page. Now that you know how to use these code snippets, let\u2019s explore various shortcodes you can use to enhance your WordPress website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-woocommerce-shortcodes-and-how-to-use-them\"><a><\/a>WooCommerce shortcodes and how to use them<\/h2>\n\n\n\n<p>While there are many WooCommerce shortcodes, they all serve different purposes. We\u2019ve compiled a list of some of the most popular shortcodes you can use to enhance the functionality of your online shop.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-woocommerce-page-shortcodes\">1. WooCommerce page shortcodes<\/h3>\n\n\n\n<p>If you\u2019ve gone through the WooCommerce Setup Wizard, you may have noticed that page shortcodes are generated automatically. Here are the most popular page shortcodes and how to use them.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-cart\">Cart<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1058\" height=\"431\" src=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart.png\" alt=\"WooCommerce shortcodes: cart page.\" class=\"wp-image-48049\" srcset=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart.png 1058w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart-300x122.png 300w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart-1024x417.png 1024w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart-768x313.png 768w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart-24x10.png 24w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart-36x15.png 36w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcodes-cart-48x20.png 48w\" sizes=\"100vw\" \/><\/figure>\n\n\n\n<p>The WooCommerce cart shortcode simplifies the process of adding a cart page to your online store. It creates a default cart page, so you don\u2019t have to build one from scratch.<\/p>\n\n\n\n<p>In addition to displaying all the products your customers have added to their carts, this shortcode displays the subtotal, as well as the quantity and price of each product. The WooCommerce cart shortcode is as follows:<\/p>\n\n\n\n<p><strong>[woocommerce_cart]<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-order-tracking\">Order tracking<\/h4>\n\n\n\n<p>This shortcode creates a default form that online shoppers can use to check the status of their orders. Once the form is created, customers need to enter their order IDs and billing emails to track their orders.<\/p>\n\n\n\n<p>To create an order tracking form, enter the shortcode below:<\/p>\n\n\n\n<p><strong>[woocommerce_order_tracking]<\/strong><\/p>\n\n\n\n<p>Here\u2019s how the order tracking form would look on your store\u2019s frontend:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"966\" height=\"455\" src=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-order-tracking.png\" alt=\"WooCommerce order tracking form.\" class=\"wp-image-48050\" srcset=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-order-tracking.png 966w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-order-tracking-300x141.png 300w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-order-tracking-768x362.png 768w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-order-tracking-24x11.png 24w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-order-tracking-36x17.png 36w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-order-tracking-48x23.png 48w\" sizes=\"100vw\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-my-account\">My account<\/h4>\n\n\n\n<p>This shortcode displays a customer\u2019s account details. It enables customers to view, modify and update their personal information. For instance, they can view their previous orders, change their passwords and email addresses and log in and out of their accounts.<\/p>\n\n\n\n<p>The shortcode for this is:<\/p>\n\n\n\n<p><strong>[woocommerce_my_account]<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-checkout\">Checkout<\/h3>\n\n\n\n<p>This WooCommerce shortcode creates a checkout page. As such, it includes fields for customers to add their billing details and shipping information. This shortcode incorporates the &#8216;Place Order&#8217; button as well.<\/p>\n\n\n\n<p>To add the checkout page to your WooCommerce website, enter the following shortcode:<\/p>\n\n\n\n<p><strong>[woocommerce_checkout]<\/strong><\/p>\n\n\n\n<p>With more than 70% of online shopping carts being abandoned, customizing your <a href=\"https:\/\/www.bluehost.com\/blog\/woocommerce-checkout\/\">WooCommerce checkout<\/a> page is an effective way to <a href=\"https:\/\/www.bluehost.com\/blog\/conversion-rate-optimization\/\">optimize your website\u2019s conversion rate<\/a>.<\/p>\n\n\n\n<p>You can customize your checkout page using plugins such as the <a href=\"https:\/\/yithemes.com\/themes\/plugins\/yith-woocommerce-checkout-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\">YITH WooCommerce Checkout Manager<\/a>. This plugin lets you modify existing fields and add custom fields to <a href=\"https:\/\/www.bluehost.com\/blog\/optimize-check-out-flow\/\">streamline the checkout process<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-woocommerce-product-shortcodes\">2. WooCommerce product shortcodes<\/h3>\n\n\n\n<p>WooCommerce product shortcodes enable you to create customized product pages and display products anywhere you want. Let\u2019s go over how you can use them to display your products in different ways on your website.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-products\">Products<\/h4>\n\n\n\n<p>Display any item in stock using the products shortcode<strong>:<\/strong><\/p>\n\n\n\n<p><strong>[products]<\/strong><\/p>\n\n\n\n<p>The products page can be further customized to display products in ascending (ASC) or descending order (DESC).<\/p>\n\n\n\n<p>For example, if you want to list products in an ascending order, the shortcode would look like this:<\/p>\n\n\n\n<p><strong>[products order=&#8221;ASC&#8221;]<\/strong><\/p>\n\n\n\n<p>If you want to make further customizations, you have the option to restrict the number of products that will be displayed:<\/p>\n\n\n\n<p><strong>[products limit=&#8221;5&#8243; order=&#8221;ASC&#8221;]<\/strong><\/p>\n\n\n\n<p>Other parameters for this shortcode include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Orderby<\/li>\n\n\n\n<li>Category<\/li>\n\n\n\n<li>Columns<\/li>\n\n\n\n<li>Paginate<\/li>\n\n\n\n<li>SKU<\/li>\n\n\n\n<li>Tag<\/li>\n\n\n\n<li>Class<\/li>\n\n\n\n<li>Best_selling<\/li>\n\n\n\n<li>Top_rated<\/li>\n\n\n\n<li>On_sale<\/li>\n<\/ul>\n\n\n\n<p>It\u2019s worth mentioning that parameters like <strong>best_selling<\/strong>, <strong>top_rated<\/strong> and <strong>on_sale<\/strong> shouldn\u2019t be used together.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-recent-products\">Recent products<\/h4>\n\n\n\n<p>This shortcode allows you to display recent products on your website. If you\u2019ve <a href=\"https:\/\/www.bluehost.com\/blog\/launch-strategy\/\">launched exciting new products<\/a>, you can use this shortcode to draw attention to them and entice customers to make a purchase.<\/p>\n\n\n\n<p>Let\u2019s say you want to display your six newest products across three rows. The shortcode for this would be:<\/p>\n\n\n\n<p><strong>[products limit=&#8221;6&#8243; columns=&#8221;3&#8243; orderby=&#8221;id&#8221; order=&#8221;DESC&#8221; visibility=&#8221;visible&#8221;]<\/strong><\/p>\n\n\n\n<p>This shortcode lists products based on their unique IDs, which are generated when product pages are created.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-featured-products\">Featured products<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"918\" height=\"564\" src=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-featured-products.png\" alt=\"A display of featured products.\" class=\"wp-image-48052\" srcset=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-featured-products.png 918w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-featured-products-300x184.png 300w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-featured-products-768x472.png 768w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-featured-products-24x15.png 24w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-featured-products-36x22.png 36w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-featured-products-48x29.png 48w\" sizes=\"100vw\" \/><\/figure>\n\n\n\n<p>If there are certain products you want to <a href=\"https:\/\/www.bluehost.com\/blog\/ways-reach-customers\/\">draw your customers\u2019 attention<\/a> to, this WooCommerce shortcode is the one for you. The base shortcode is:<\/p>\n\n\n\n<p><strong>[featured_products]<\/strong><\/p>\n\n\n\n<p>However, if you want to display two items in one row, the shortcode will look like this:<\/p>\n\n\n\n<p><strong>[featured_products limit=&#8221;2&#8243; columns=&#8221;2&#8243;]<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-on-sale-products\">On-sale products<\/h4>\n\n\n\n<p>If you want to showcase on-sale products, WooCommerce shortcodes can be of great help. To display three on-sale products ordered by their popularity, you can use this shortcode:<\/p>\n\n\n\n<p><strong>[products limit=&#8221;3&#8243; columns=&#8221;3&#8243; orderby=&#8221;popularity&#8221; on_sale=&#8221;true&#8221;]<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-top-rated-products\">Top-rated products<\/h4>\n\n\n\n<p>When searching for products that meet their needs, most customers seek out top-rated items. Here\u2019s where the top-rated products shortcode comes in. It allows you to display items with the highest ratings in your online store.<\/p>\n\n\n\n<p>The shortcode for this is:<\/p>\n\n\n\n<p><strong>[top_rated_products]<\/strong><\/p>\n\n\n\n<p>This shortcode shouldn\u2019t be used in conjunction with <strong>on_sale<\/strong> or <strong>best_selling<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-best-selling-products\">Best-selling products<\/h4>\n\n\n\n<p>Best-selling products shortcodes allow you to showcase your best-selling products. You can display them on your homepage to draw attention to them once a potential customer visits your website.<\/p>\n\n\n\n<p>If you want to showcase a four-column grid of your four best-selling products, the shortcode is as follows:<\/p>\n\n\n\n<p><strong>[products limit=&#8221;4&#8243; columns=&#8221;4&#8243; best_selling=&#8221;true&#8221;]<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"849\" height=\"401\" src=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-best-selling-products.png\" alt=\"A display of best-selling products.\" class=\"wp-image-48054\" srcset=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-best-selling-products.png 849w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-best-selling-products-300x142.png 300w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-best-selling-products-768x363.png 768w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-best-selling-products-24x11.png 24w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-best-selling-products-36x17.png 36w, https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/display-best-selling-products-48x23.png 48w\" sizes=\"100vw\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-product-tags\">Product tags<\/h4>\n\n\n\n<p>Product tags allow you to display only products with a particular tag. The shortcode for this function is pretty straightforward. For example, to showcase products with the tag \u201cpants,\u201d you can use the shortcode:<\/p>\n\n\n\n<p><strong>[products tag=&#8221;pants&#8221;]<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-woocommerce-product-category-shortcodes\">3. WooCommerce product category shortcodes<\/h3>\n\n\n\n<p>Another commonly used WooCommerce shortcode is the product category shortcode. Here are the two main shortcodes and their use cases.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-product-category\">Product category<\/h4>\n\n\n\n<p>This shortcode allows you to display products from a specific category on any page. If you want to attract customers to a new product category, this shortcode can come in handy:<\/p>\n\n\n\n<p><strong>[product_category]<\/strong><\/p>\n\n\n\n<p>For example, to display products from the pants category, you can use this shortcode:<\/p>\n\n\n\n<p><strong>[product_category category=&#8221;pants&#8221;]<\/strong><\/p>\n\n\n\n<p>You can opt to modify this further. For example, you can display six products from the pants category in three columns and in descending order using this shortcode:<\/p>\n\n\n\n<p><strong>[product_category category=&#8221;pants&#8221; limit=&#8221;6&#8243; columns=&#8221;3&#8243; order=&#8221;DESC&#8221;]<\/strong><\/p>\n\n\n\n<p>You can also add more product categories and separate them with commas. In the example below, we\u2019ll add jackets to the pants category.<\/p>\n\n\n\n<p><strong>[product_category category=&#8221;pants,jackets&#8221;]<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-product-categories\">Product categories<\/h4>\n\n\n\n<p>The product categories shortcode lets you display <em>all<\/em> your product categories at once:<\/p>\n\n\n\n<p><strong>[product_categories]<\/strong><\/p>\n\n\n\n<p>So, if you\u2019ve got several categories like pants, t-shirts and jackets, this shortcode will display all these options.<\/p>\n\n\n\n<p>This shortcode can also be used to highlight specific category IDs. For example:<\/p>\n\n\n\n<p><strong>[product_categories IDs=&#8221;5,6,7&#8243;]<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-other-useful-woocommerce-shortcodes\">4. Other useful WooCommerce shortcodes<\/h3>\n\n\n\n<p>Besides the WooCommerce shortcodes listed above, here are other useful shortcodes to add to your website.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-related-products\">Related products<\/h4>\n\n\n\n<p>As the name implies, this shortcode lets you display products related to the products a customer views on your website. The base shortcode is:<\/p>\n\n\n\n<p><strong>[related_products]<\/strong><\/p>\n\n\n\n<p>It accepts arguments such as limit, orderby and columns. For instance, you can display four related products by adding a limit parameter to the shortcode:<\/p>\n\n\n\n<p><strong>[related_products limit=&#8221;4&#8243;]<\/strong><\/p>\n\n\n\n<p>The limit parameter controls the number of related products you want to display to each customer.<\/p>\n\n\n\n<p>Here\u2019s another example:<\/p>\n\n\n\n<p><strong>[related_products limit=&#8221;4&#8243; columns=&#8221;4&#8243;]<\/strong><\/p>\n\n\n\n<p>This allows you to showcase related products in a grid containing four products per row.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-product-page\">Product page<\/h4>\n\n\n\n<p>The product page shortcode lets you display a single product page by ID or SKU. Let\u2019s say you want to display a product whose ID is 28.<\/p>\n\n\n\n<p>The shortcode would be:<\/p>\n\n\n\n<p><strong>[product_page id=&#8221;28&#8243;]<\/strong><\/p>\n\n\n\n<p>If you\u2019re keen on writing blog posts, use this shortcode to embed a specific product in your post, allowing your readers to access it easily.<\/p>\n\n\n\n<p>To find the ID of a product, log in to your <a href=\"https:\/\/www.bluehost.com\/blog\/wordpress-dashboard-walkthrough\/\">WordPress admin dashboard<\/a> and navigate to &#8216;Products&#8217; > &#8216;All Products&#8217;. Hover over a specific product title and you\u2019ll see the product\u2019s unique ID.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-product-table\">Product table<\/h4>\n\n\n\n<p>With the WooCommerce Product Table, you can add product tables to your online store and provide customers with an enjoyable one-page shopping experience. Customers can find the products they need, select their desired quantities and add products to cart without having to visit several pages.<\/p>\n\n\n\n<p>In addition, this plugin includes tons of customization options. For example, you can select specific product categories you want to showcase. You can also opt to display product variations using dropdown menus.<\/p>\n\n\n\n<p>Lastly, you can display the product table on any section of your website using the shortcode:<\/p>\n\n\n\n<p><strong>[cwpt_table]<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-add-to-cart\">Add to cart<\/h4>\n\n\n\n<p>The add-to-cart shortcode allows you to display the add-to-cart button for a single product. It\u2019s a useful feature when you don\u2019t want to display the full product details.<\/p>\n\n\n\n<p>A blog post is a great place to use the add-to-cart button. The WooCommerce shortcode for this is:<\/p>\n\n\n\n<p><strong>[add_to_cart id=&#8221;99&#8243;]<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-troubleshoot-woocommerce-shortcodes\"><a><\/a>How to troubleshoot WooCommerce shortcodes<\/h2>\n\n\n\n<p>If you ever encounter any problems while using WooCommerce shortcodes, here are a number of helpful tips you can use to troubleshoot them.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check if you embedded the shortcode between <strong>&lt;pre&gt;<\/strong> tags. If this is the case, go to the text editor to remove these unwanted tags.<\/li>\n\n\n\n<li>Make sure the quotation marks are straight (&#8220;) and not curly (\u201c).<\/li>\n\n\n\n<li>Use square brackets.<\/li>\n\n\n\n<li>Ensure that each attribute value, which follows the equal sign, is enclosed in quotation marks.<\/li>\n\n\n\n<li>Use the latest version of WooCommerce.<\/li>\n\n\n\n<li>Switch to a different theme, as your current theme may be conflicting with the WordPress shortcode you want to use.<\/li>\n\n\n\n<li>If you suspect a plugin is causing the error, deactivate each plugin one by one and keep testing the shortcode to see if it works.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-alternatives-to-woocommerce-shortcodes\"><a><\/a>Alternatives to WooCommerce shortcodes<\/h2>\n\n\n\n<p>If you\u2019re looking for other ways to showcase products on your website and customize your store, here are some alternatives to WooCommerce shortcodes you can use.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-woocommerce-blocks\"><a><\/a>WooCommerce blocks<\/h3>\n\n\n\n<p><a href=\"https:\/\/woocommerce.com\/products\/woocommerce-gutenberg-products-block\/\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce blocks<\/a> are a great alternative to shortcodes. They offer several blocks you can use to build and customize your eCommerce store.<\/p>\n\n\n\n<p>By using WooCommerce blocks, you can display a grid of your best-selling products, highlight reviews from specific categories, display<em> all<\/em> products from your store and allow shoppers to view their carts from any page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-woocommerce-shortcode-plugins\"><a><\/a>WooCommerce shortcode plugins<\/h3>\n\n\n\n<p>Various plugins in the marketplace let you add shortcodes to your website without any technical expertise. <a href=\"https:\/\/intenseplugin.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Intense<\/a> is one such plugin. It offers over 100 shortcodes and 19 <a href=\"https:\/\/www.bluehost.com\/blog\/create-custom-post-types-wordpress\/\">custom post types<\/a>.<\/p>\n\n\n\n<p>Custom post types provide a way for you to expand content marketing beyond just blog posts. This plugin is mobile responsive and is created with your website\u2019s performance in mind, helping you create a superior user experience.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-bluehost-woocommerce-hosting-powering-your-store-with-ease\">Bluehost WooCommerce hosting: Powering your store with ease<strong>\u00a0<\/strong>\u00a0<\/h2>\n\n\n\n<p>If you\u2019re looking for a hassle-free way to set up and manage your online store, Bluehost\u2019s WooCommerce hosting plans are worth considering. Designed specifically for eCommerce businesses, these plans come with WooCommerce pre-installed, so you can start selling right away\u2014no technical headaches required.&nbsp;<\/p>\n\n\n\n<p>Plus, you get a <a href=\"https:\/\/www.bluehost.com\/blog\/free-domain-name-with-bluehost\/\">free domain<\/a> for the first year, a <a href=\"https:\/\/www.bluehost.com\/blog\/how-to-get-free-ssl-wordpress\/\">free SSL<\/a> certificate for secure transactions and 24\/7 customer support in case you ever need a hand. Whether you&#8217;re launching your first online store or scaling an existing shop page, Bluehost provides a solid foundation with reliable performance and built-in tools to make store management a breeze.&nbsp;<\/p>\n\n\n\n<p>Want to focus on growing your business instead of dealing with hosting hassles? Bluehost\u2019s WooCommerce hosting makes that possible.&nbsp;<\/p>\n\n\n\n<svg version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" viewBox=\"0 0 1001 300\"> \n\n  <image width=\"1001\" height=\"300\" xlink:href=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2025\/02\/WooCommerce-Hosting-1.jpg\"><\/image> <a xlink:href=\"https:\/\/www.bluehost.com\/wordpress\/commerce-hosting\"> \n\n    <rect x=\"82\" y=\"185\" fill=\"#fff\" opacity=\"0\" width=\"165\" height=\"52\"><\/rect> \n\n  <\/a> \n\n<\/svg> \n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-final-thoughts\">Final thoughts<\/h2>\n\n\n\n<p>WooCommerce shortcodes enable you to highlight product features and benefits, provide quick access to information, simplify the checkout process and achieve your business goals. This level of customization is hard to beat.<\/p>\n\n\n\n<p>And with a highly competitive eCommerce landscape, it\u2019s important to build your business on a solid foundation. This requires choosing a reliable <a href=\"https:\/\/www.bluehost.com\/hosting\/shared\">web hosting<\/a> provider, like Bluehost.<\/p>\n\n\n\n<p>Our <a href=\"https:\/\/www.bluehost.com\/wordpress\/woocommerce-hosting\">WooCommerce hosting plans<\/a> come with tools and features that simplify website building and management. In addition, you\u2019ll gain access to real-time support, so you\u2019ll always get help when you need it.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.bluehost.com\/contact\">Contact us<\/a> today to discover how we can help you grow your online store.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faqs\">FAQs<\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1743083468183\"><strong class=\"schema-faq-question\"><strong>What are WooCommerce shortcodes?\u00a0<\/strong>\u00a0<\/strong> <p class=\"schema-faq-answer\">WooCommerce shortcodes are small pieces of code enclosed in square brackets (e.g., `[woocommerce_cart]`) that allow you to display various WooCommerce elements\u2014such as products, cart, checkout and order tracking\u2014on any page or post.\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1743083526042\"><strong class=\"schema-faq-question\"><strong>How do I display a specific product using a shortcode?\u00a0<\/strong>\u00a0<\/strong> <p class=\"schema-faq-answer\">You can use the `[product]` shortcode with the `id` attribute to display a specific product. Example:\u00a0\u00a0<br\/>&#8220;`[product id=&#8221;123&#8243;]&#8220;`\u00a0\u00a0<br\/>Replace `&#8221;123&#8243;` with the actual product ID.\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1743083553440\"><strong class=\"schema-faq-question\"><strong>Can I show a list of products in a category using a shortcode?\u00a0<\/strong>\u00a0<\/strong> <p class=\"schema-faq-answer\">Yes! Use the `[products]` shortcode with the `category` attribute. Example:\u00a0\u00a0<br\/>&#8220;`[products category=&#8221;clothing&#8221;]&#8220;`\u00a0\u00a0<br\/>This will display all products from the &#8220;clothing&#8221; category.\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1743083582513\"><strong class=\"schema-faq-question\"><strong>How do I add the cart or checkout page using shortcodes?\u00a0<\/strong>\u00a0<\/strong> <p class=\"schema-faq-answer\">WooCommerce provides built-in shortcodes for this:\u00a0\u00a0<br\/>&#8211; Cart: `[woocommerce_cart]`\u00a0\u00a0<br\/>&#8211; Checkout: `[woocommerce_checkout]`\u00a0\u00a0<br\/>&#8211; Order Tracking: `[woocommerce_order_tracking]`\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1743083609518\"><strong class=\"schema-faq-question\"><strong>Is there a shortcode for displaying recent products?\u00a0<\/strong>\u00a0<\/strong> <p class=\"schema-faq-answer\">Yes! Use `[recent_products]` to showcase the latest products. You can customize it like this:\u00a0\u00a0<br\/>&#8220;`[recent_products per_page=&#8221;6&#8243; columns=&#8221;3&#8243;]&#8220;`\u00a0\u00a0<br\/>This will display six recent products in a three-column layout.\u00a0<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Unlock the power of WooCommerce shortcodes to customize your store, enhance UX and boost conversions\u2014no coding needed! <\/p>\n","protected":false},"author":152,"featured_media":48041,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_title":"WooCommerce Shortcodes: A Beginner\u2019s Guide","_yoast_wpseo_metadesc":"Unlock the full potential of your store with the power of WooCommerce shortcodes. Learn what they are, how to use them and more in our in-depth guide.","inline_featured_image":false,"footnotes":""},"categories":[582,3054],"tags":[3317,3335,3343],"ppma_author":[948],"class_list":["post-48040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecommerce","category-woocommerce","tag-cms","tag-small-business","tag-tutorials"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.1 (Yoast SEO v27.1.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>WooCommerce Shortcodes: A Beginner\u2019s Guide<\/title>\n<meta name=\"description\" content=\"Unlock the full potential of your store with the power of WooCommerce shortcodes. Learn what they are, how to use them and more in our in-depth guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/posts\/48040\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WooCommerce Shortcodes: A Comprehensive Guide\" \/>\n<meta property=\"og:description\" content=\"Unlock the full potential of your store with the power of WooCommerce shortcodes. Learn what they are, how to use them and more in our in-depth guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/\" \/>\n<meta property=\"og:site_name\" content=\"Bluehost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bluehost\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-08T09:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-29T06:27:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Charrvi Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bluehost\" \/>\n<meta name=\"twitter:site\" content=\"@bluehost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Charrvi Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/\"},\"author\":{\"name\":\"Charrvi Singh\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/#\/schema\/person\/0dd00ba2d4fe091c8ca8ade8b5d5d4ce\"},\"headline\":\"WooCommerce Shortcodes: A Comprehensive Guide\",\"datePublished\":\"2023-11-08T09:00:00+00:00\",\"dateModified\":\"2025-05-29T06:27:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/\"},\"wordCount\":2858,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png\",\"keywords\":[\"CMS\",\"Small Business\",\"Tutorials\"],\"articleSection\":[\"Ecommerce\",\"WooCommerce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/\",\"url\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/\",\"name\":\"WooCommerce Shortcodes: A Beginner\u2019s Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png\",\"datePublished\":\"2023-11-08T09:00:00+00:00\",\"dateModified\":\"2025-05-29T06:27:30+00:00\",\"description\":\"Unlock the full potential of your store with the power of WooCommerce shortcodes. Learn what they are, how to use them and more in our in-depth guide.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083468183\"},{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083526042\"},{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083553440\"},{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083582513\"},{\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083609518\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage\",\"url\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png\",\"contentUrl\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png\",\"width\":1920,\"height\":1080,\"caption\":\"WooCommerce shortcodes: A beginner\u2019s guide.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.bluehost.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Websites\",\"item\":\"https:\/\/www.bluehost.com\/blog\/category\/websites\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WooCommerce Shortcodes: A Comprehensive Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/#website\",\"url\":\"https:\/\/www.bluehost.com\/blog\/\",\"name\":\"Bluehost\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.bluehost.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/#organization\",\"name\":\"Bluehost\",\"url\":\"https:\/\/www.bluehost.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/08\/bluehost-logo.svg\",\"contentUrl\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/08\/bluehost-logo.svg\",\"width\":136,\"height\":24,\"caption\":\"Bluehost\"},\"image\":{\"@id\":\"https:\/\/www.bluehost.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/bluehost\/\",\"https:\/\/x.com\/bluehost\",\"https:\/\/www.linkedin.com\/company\/bluehost-com\/\",\"https:\/\/www.youtube.com\/user\/bluehost\",\"https:\/\/en.wikipedia.org\/wiki\/Bluehost\"],\"description\":\"Bluehost is a leading web hosting provider empowering millions of websites worldwide. \\u2028Discover how Bluehost's expertise, reliability, and innovation can help you achieve your online goals.\",\"telephone\":\"+1-888-401-4678\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/#\/schema\/person\/0dd00ba2d4fe091c8ca8ade8b5d5d4ce\",\"name\":\"Charrvi Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/#\/schema\/person\/image\/c446c4008d82f101ae13175515e45db7\",\"url\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2024\/11\/Media-e1732870672924.jpg\",\"contentUrl\":\"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2024\/11\/Media-e1732870672924.jpg\",\"caption\":\"Charrvi Singh\"},\"description\":\"I\u2019m a published author, learning every day how words can make ideas clearer and connections stronger. Beyond work, I enjoy exploring new perspectives and finding inspiration in the small details of life.\",\"url\":\"https:\/\/www.bluehost.com\/blog\/author\/charrvi-singh\/\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083468183\",\"position\":1,\"url\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083468183\",\"name\":\"What are WooCommerce shortcodes?\u00a0\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"WooCommerce shortcodes are small pieces of code enclosed in square brackets (e.g., `[woocommerce_cart]`) that allow you to display various WooCommerce elements\u2014such as products, cart, checkout and order tracking\u2014on any page or post.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083526042\",\"position\":2,\"url\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083526042\",\"name\":\"How do I display a specific product using a shortcode?\u00a0\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"You can use the `[product]` shortcode with the `id` attribute to display a specific product. Example:\u00a0\u00a0<br\/>```[product id=\\\"123\\\"]```\u00a0\u00a0<br\/>Replace `\\\"123\\\"` with the actual product ID.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083553440\",\"position\":3,\"url\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083553440\",\"name\":\"Can I show a list of products in a category using a shortcode?\u00a0\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes! Use the `[products]` shortcode with the `category` attribute. Example:\u00a0\u00a0<br\/>```[products category=\\\"clothing\\\"]```\u00a0\u00a0<br\/>This will display all products from the \\\"clothing\\\" category.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083582513\",\"position\":4,\"url\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083582513\",\"name\":\"How do I add the cart or checkout page using shortcodes?\u00a0\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"WooCommerce provides built-in shortcodes for this:\u00a0\u00a0<br\/>- Cart: `[woocommerce_cart]`\u00a0\u00a0<br\/>- Checkout: `[woocommerce_checkout]`\u00a0\u00a0<br\/>- Order Tracking: `[woocommerce_order_tracking]`\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083609518\",\"position\":5,\"url\":\"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083609518\",\"name\":\"Is there a shortcode for displaying recent products?\u00a0\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes! Use `[recent_products]` to showcase the latest products. You can customize it like this:\u00a0\u00a0<br\/>```[recent_products per_page=\\\"6\\\" columns=\\\"3\\\"]```\u00a0\u00a0<br\/>This will display six recent products in a three-column layout.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"WooCommerce Shortcodes: A Beginner\u2019s Guide","description":"Unlock the full potential of your store with the power of WooCommerce shortcodes. Learn what they are, how to use them and more in our in-depth guide.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/posts\/48040\/","og_locale":"en_US","og_type":"article","og_title":"WooCommerce Shortcodes: A Comprehensive Guide","og_description":"Unlock the full potential of your store with the power of WooCommerce shortcodes. Learn what they are, how to use them and more in our in-depth guide.","og_url":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/","og_site_name":"Bluehost Blog","article_publisher":"https:\/\/www.facebook.com\/bluehost\/","article_published_time":"2023-11-08T09:00:00+00:00","article_modified_time":"2025-05-29T06:27:30+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png","type":"image\/png"}],"author":"Charrvi Singh","twitter_card":"summary_large_image","twitter_creator":"@bluehost","twitter_site":"@bluehost","twitter_misc":{"Written by":"Charrvi Singh","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#article","isPartOf":{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/"},"author":{"name":"Charrvi Singh","@id":"https:\/\/www.bluehost.com\/blog\/#\/schema\/person\/0dd00ba2d4fe091c8ca8ade8b5d5d4ce"},"headline":"WooCommerce Shortcodes: A Comprehensive Guide","datePublished":"2023-11-08T09:00:00+00:00","dateModified":"2025-05-29T06:27:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/"},"wordCount":2858,"commentCount":0,"publisher":{"@id":"https:\/\/www.bluehost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png","keywords":["CMS","Small Business","Tutorials"],"articleSection":["Ecommerce","WooCommerce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/","url":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/","name":"WooCommerce Shortcodes: A Beginner\u2019s Guide","isPartOf":{"@id":"https:\/\/www.bluehost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage"},"image":{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png","datePublished":"2023-11-08T09:00:00+00:00","dateModified":"2025-05-29T06:27:30+00:00","description":"Unlock the full potential of your store with the power of WooCommerce shortcodes. Learn what they are, how to use them and more in our in-depth guide.","breadcrumb":{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083468183"},{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083526042"},{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083553440"},{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083582513"},{"@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083609518"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#primaryimage","url":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png","contentUrl":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/11\/WooCommerce-shortcode.png","width":1920,"height":1080,"caption":"WooCommerce shortcodes: A beginner\u2019s guide."},{"@type":"BreadcrumbList","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bluehost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Websites","item":"https:\/\/www.bluehost.com\/blog\/category\/websites\/"},{"@type":"ListItem","position":3,"name":"WooCommerce Shortcodes: A Comprehensive Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.bluehost.com\/blog\/#website","url":"https:\/\/www.bluehost.com\/blog\/","name":"Bluehost","description":"","publisher":{"@id":"https:\/\/www.bluehost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bluehost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bluehost.com\/blog\/#organization","name":"Bluehost","url":"https:\/\/www.bluehost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bluehost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/08\/bluehost-logo.svg","contentUrl":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2023\/08\/bluehost-logo.svg","width":136,"height":24,"caption":"Bluehost"},"image":{"@id":"https:\/\/www.bluehost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/bluehost\/","https:\/\/x.com\/bluehost","https:\/\/www.linkedin.com\/company\/bluehost-com\/","https:\/\/www.youtube.com\/user\/bluehost","https:\/\/en.wikipedia.org\/wiki\/Bluehost"],"description":"Bluehost is a leading web hosting provider empowering millions of websites worldwide. \u2028Discover how Bluehost's expertise, reliability, and innovation can help you achieve your online goals.","telephone":"+1-888-401-4678"},{"@type":"Person","@id":"https:\/\/www.bluehost.com\/blog\/#\/schema\/person\/0dd00ba2d4fe091c8ca8ade8b5d5d4ce","name":"Charrvi Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bluehost.com\/blog\/#\/schema\/person\/image\/c446c4008d82f101ae13175515e45db7","url":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2024\/11\/Media-e1732870672924.jpg","contentUrl":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2024\/11\/Media-e1732870672924.jpg","caption":"Charrvi Singh"},"description":"I\u2019m a published author, learning every day how words can make ideas clearer and connections stronger. Beyond work, I enjoy exploring new perspectives and finding inspiration in the small details of life.","url":"https:\/\/www.bluehost.com\/blog\/author\/charrvi-singh\/"},{"@type":"Question","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083468183","position":1,"url":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083468183","name":"What are WooCommerce shortcodes?\u00a0\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"WooCommerce shortcodes are small pieces of code enclosed in square brackets (e.g., `[woocommerce_cart]`) that allow you to display various WooCommerce elements\u2014such as products, cart, checkout and order tracking\u2014on any page or post.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083526042","position":2,"url":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083526042","name":"How do I display a specific product using a shortcode?\u00a0\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"You can use the `[product]` shortcode with the `id` attribute to display a specific product. Example:\u00a0\u00a0<br\/>```[product id=\"123\"]```\u00a0\u00a0<br\/>Replace `\"123\"` with the actual product ID.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083553440","position":3,"url":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083553440","name":"Can I show a list of products in a category using a shortcode?\u00a0\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Yes! Use the `[products]` shortcode with the `category` attribute. Example:\u00a0\u00a0<br\/>```[products category=\"clothing\"]```\u00a0\u00a0<br\/>This will display all products from the \"clothing\" category.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083582513","position":4,"url":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083582513","name":"How do I add the cart or checkout page using shortcodes?\u00a0\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"WooCommerce provides built-in shortcodes for this:\u00a0\u00a0<br\/>- Cart: `[woocommerce_cart]`\u00a0\u00a0<br\/>- Checkout: `[woocommerce_checkout]`\u00a0\u00a0<br\/>- Order Tracking: `[woocommerce_order_tracking]`\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083609518","position":5,"url":"https:\/\/www.bluehost.com\/blog\/woocommerce-shortcodes\/#faq-question-1743083609518","name":"Is there a shortcode for displaying recent products?\u00a0\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Yes! Use `[recent_products]` to showcase the latest products. You can customize it like this:\u00a0\u00a0<br\/>```[recent_products per_page=\"6\" columns=\"3\"]```\u00a0\u00a0<br\/>This will display six recent products in a three-column layout.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"authors":[{"term_id":948,"user_id":152,"is_guest":0,"slug":"charrvi-singh","display_name":"Charrvi Singh","avatar_url":{"url":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2024\/11\/Media-e1732870672924.jpg","url2x":"https:\/\/www.bluehost.com\/blog\/wp-content\/uploads\/2024\/11\/Media-e1732870672924.jpg"},"0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":"","11":"","12":"","13":"","14":"","15":""}],"_links":{"self":[{"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/posts\/48040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/users\/152"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/comments?post=48040"}],"version-history":[{"count":0,"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/posts\/48040\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/media\/48041"}],"wp:attachment":[{"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/media?parent=48040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/categories?post=48040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/tags?post=48040"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.bluehost.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=48040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}