{"id":1604,"date":"2025-11-03T05:15:30","date_gmt":"2025-11-03T05:15:30","guid":{"rendered":"https:\/\/stackwc.com\/?p=1604"},"modified":"2026-01-08T10:59:05","modified_gmt":"2026-01-08T10:59:05","slug":"woocommerce-shortcodes","status":"publish","type":"post","link":"https:\/\/stackwc.com\/woocommerce-shortcodes\/","title":{"rendered":"Complete Guide to WooCommerce Shortcodes"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">Running a <a href=\"https:\/\/stackwc.com\/category\/tutorials\/\" data-type=\"link\" data-id=\"https:\/\/stackwc.com\/category\/tutorials\/\">WooCommerce<\/a> store? Then you&#8217;re sitting on a goldmine of functionality that most store owners completely overlook. I&#8217;m talking about shortcodes \u2013 those little bits of code that can transform your store&#8217;s presentation without touching a single line of PHP.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After helping dozens of online stores optimize their WooCommerce setup, I&#8217;ve learned that shortcodes are the secret weapon for creating a professional-looking store without hiring a developer. Let me show you exactly how to use them.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Understanding Shortcodes in WordPress<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Think of shortcodes as shortcuts (hence the name) that tell WordPress to do something specific. They&#8217;ve been a core feature since <a href=\"https:\/\/wordpress.org\/documentation\/wordpress-version\/version-2-5\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/wordpress.org\/documentation\/wordpress-version\/version-2-5\/\" rel=\"noreferrer noopener nofollow\">WordPress 2.5 in 2008<\/a>, and they look like this: <code>[shortcode]<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of spending hours coding a product gallery or manually updating your featured items, you drop in a shortcode and boom \u2013 done. It&#8217;s like having a Swiss Army knife for your store&#8217;s layout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What makes them brilliant is their simplicity. You get powerful functionality with just a few characters. Plus, when you need to make changes, you&#8217;re updating one shortcode instead of hunting through dozens of product pages.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Getting started with WooCommerce shortcodes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First things first \u2013 make sure WooCommerce is actually installed. Head to your WordPress dashboard, click Plugins &gt; Add New, search for &#8220;<a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" rel=\"noreferrer noopener nofollow\">WooCommerce<\/a>,&#8221; and hit that install button. Once it&#8217;s activated, you&#8217;ll run through a quick setup wizard that handles your store basics like payment gateways and shipping zones.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s something neat: WooCommerce automatically creates your Cart, Checkout, and My Account pages. These pages already use shortcodes behind the scenes, which is why they work right out of the box.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large has-custom-border\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-1-1024x577.jpg\" alt=\"\" class=\"wp-image-1972\" style=\"border-top-left-radius:12px;border-top-right-radius:12px;border-bottom-left-radius:12px;border-bottom-right-radius:12px\" srcset=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-1-1024x577.jpg 1024w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-1-300x169.jpg 300w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-1-768x433.jpg 768w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-1.jpg 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">How Shortcodes Actually Work<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The basic formula is straightforward. You&#8217;ve got your shortcode wrapped in brackets, and you can add attributes to customize what it does:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;shortcode attribute1=\"value1\" attribute2=\"value2\"]<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Want to show four products in two columns? Just use: <code>[products limit=\"4\" columns=\"2\"]<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See how that works? You&#8217;re basically giving WordPress instructions in plain English (well, almost).<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Where Can You Use Them?<\/h3>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-f26e22bd wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">Pretty much anywhere. I use them in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Blog posts to showcase relevant products<\/li>\n\n\n\n<li>Landing pages for special promotions<\/li>\n\n\n\n<li>Sidebars to display categories<\/li>\n\n\n\n<li>Footer widgets for featured items<\/li>\n<\/ul>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The easiest way to add them in the block editor (Gutenberg) is to click the plus icon, search for &#8220;Shortcode,&#8221; and paste your code into that block. For classic editor fans, you can just paste the shortcode directly into your content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of my favorite tricks is adding product shortcodes to blog posts. Writing about hiking gear? Drop in a shortcode showing your best-selling hiking products right there in the article. It&#8217;s contextual selling at its finest.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Must-Know WooCommerce Product Display Shortcodes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s get into the meat of this. The <code>[products]<\/code> shortcode is your workhorse \u2013 it&#8217;s incredibly versatile and handles most of what you&#8217;ll need.<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-f26e22bd wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">The Main Attributes You&#8217;ll Use<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>limit<\/strong> \u2013 How many products to show (default shows all)<\/li>\n\n\n\n<li><strong>columns<\/strong> \u2013 Grid layout (default is 4 columns)<\/li>\n\n\n\n<li><strong>orderby<\/strong> \u2013 Sort by date, price, popularity, title, etc.<\/li>\n\n\n\n<li><strong>order<\/strong> \u2013 ASC for ascending, DESC for descending<\/li>\n\n\n\n<li><strong>category<\/strong> \u2013 Filter by category slug<\/li>\n\n\n\n<li><strong>paginate<\/strong> \u2013 Add page numbers (true\/false)<\/li>\n<\/ul>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s a real-world example. Say you want your eight newest products displayed in a grid:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;products limit=\"6\" columns=\"3\" orderby=\"date\" order=\"DESC\"]<\/code><\/pre>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large has-custom-border\"><img decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode_2-1024x577.jpg\" alt=\"\" class=\"wp-image-1980\" style=\"border-top-left-radius:12px;border-top-right-radius:12px;border-bottom-left-radius:12px;border-bottom-right-radius:12px\" srcset=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode_2-1024x577.jpg 1024w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode_2-300x169.jpg 300w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode_2-768x433.jpg 768w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode_2.jpg 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This creates a clean, four-column layout showing your latest additions. Your customers see fresh products first, which keeps your store feeling current.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Want pagination so visitors can browse through more products? Just add one more attribute:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code><code>&#91;products limit=\"4\" columns=\"3\" orderby=\"date\" order=\"DESC\" paginate=\"true\"]<\/code><\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Showing Products by Category<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is where things get really useful. Let&#8217;s say you have an accessories category and want to feature six items from it:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;products category=\"accessories\" limit=\"6\" columns=\"3\"]<\/code><\/pre>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large has-custom-border\"><img decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-3-1024x577.jpg\" alt=\"\" class=\"wp-image-1976\" style=\"border-top-left-radius:12px;border-top-right-radius:12px;border-bottom-left-radius:12px;border-bottom-right-radius:12px\" srcset=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-3-1024x577.jpg 1024w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-3-300x169.jpg 300w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-3-768x433.jpg 768w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-3.jpg 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Quick tip: Make sure you use the category slug, not the full name. If your category is &#8220;Men&#8217;s Accessories,&#8221; the slug is probably &#8220;mens-accessories.&#8221;<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Single Product Display<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Need to highlight one specific product? Use the <code>[product]<\/code> shortcode with the product ID:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;product id=\"66\"]<\/code><\/pre>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-4-1024x577.jpg\" alt=\"\" class=\"wp-image-1977\" style=\"border-top-left-radius:12px;border-top-right-radius:12px;border-bottom-left-radius:12px;border-bottom-right-radius:12px\" srcset=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-4-1024x577.jpg 1024w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-4-300x169.jpg 300w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-4-768x433.jpg 768w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-4.jpg 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is perfect for blog posts where you&#8217;re discussing a particular item. The product appears right there in your content with its image, price, and add-to-cart button.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For multiple specific products, use the plural version with IDs:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;products columns=\"3\" ids=\"66,65,64\"]<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image size-large has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-5-1024x577.jpg\" alt=\"\" class=\"wp-image-1978\" style=\"border-top-left-radius:12px;border-top-right-radius:12px;border-bottom-left-radius:12px;border-bottom-right-radius:12px\" srcset=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-5-1024x577.jpg 1024w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-5-300x169.jpg 300w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-5-768x433.jpg 768w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-5.jpg 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Full Product Page Embed<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s one that not many people know about: <code>[product_page]<\/code>. This doesn&#8217;t just show the product \u2013 it shows everything. The full description, tabs, reviews, related products, the works:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;product_page id=\"66\"]<\/code><\/pre>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-6-1024x577.jpg\" alt=\"\" class=\"wp-image-1979\" srcset=\"https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-6-1024x577.jpg 1024w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-6-300x169.jpg 300w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-6-768x433.jpg 768w, https:\/\/stackwc.com\/wp-content\/uploads\/2025\/11\/woo-shortcode-6.jpg 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I use this when creating feature pages for hero products. It gives you the complete product experience without actually being on the product page.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Category Operators (This Gets Interesting)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>cat_operator<\/code> attribute lets you filter products in sophisticated ways:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Show products in multiple specific categories:<\/strong> <code>[products category=\"clothing,accessories\" cat_operator=\"AND\"]<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Show products from any of these categories:<\/strong> <code>[products category=\"clothing,accessories\" cat_operator=\"IN\"]<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Exclude products from a category:<\/strong> <code>[products category=\"clearance\" cat_operator=\"NOT IN\"]<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That last one is great when you want to show your main product line without including clearance items.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Essential WooCommerce Cart and Account Shortcodes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These shortcodes are already working in your store, but knowing them helps if you ever need to recreate pages or add functionality elsewhere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[woocommerce_cart]<\/code> \u2013 Your complete shopping cart page <code>[woocommerce_checkout]<\/code> \u2013 The checkout experience <code>[woocommerce_my_account]<\/code> \u2013 Customer account dashboard <code>[woocommerce_order_tracking]<\/code> \u2013 Let customers track their orders<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That order tracking shortcode is particularly useful. I&#8217;ve seen stores create a dedicated &#8220;Track Your Order&#8221; page in their menu, making it easier for customers to find their shipment status.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Category Display Options<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Want to show off your product categories with nice thumbnails? The <code>[product_categories]<\/code> shortcode has you covered:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;product_categories number=\"12\" columns=\"4\" orderby=\"name\" order=\"ASC\"]<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This creates a beautiful category grid. Pro tip: Make sure you upload thumbnail images for each category (Products &gt; Categories &gt; Edit category). Those images make a huge difference in how professional your store looks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To show products from one specific category:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;product_category category=\"clothing\" per_page=\"8\" columns=\"4\"]<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Advanced Shortcode Techniques<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ready to level up? These specialized shortcodes help you create dynamic, engaging product displays.<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Sale and Featured Products<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Running a sale? Highlight those deals:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;products on_sale=\"true\" limit=\"8\" columns=\"4\"]<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Show off your featured products:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;featured_products limit=\"6\" columns=\"3\"]<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">To mark products as featured, go to your Products page and click the star icon next to any product. Simple as that.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Time-Sensitive Displays<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>[recent_products]<\/code> shortcode keeps your store feeling fresh:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;recent_products limit=\"5\" columns=\"5\"]<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This automatically updates as you add new products. Set it once on your homepage, and it stays current without any manual updates.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Best Sellers and Top Rated<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">These shortcodes tap into your store&#8217;s performance data:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;best_selling_products limit=\"10\" columns=\"4\"] &#91;top_rated_products limit=\"4\" columns=\"2\"]<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Social proof is powerful. When visitors see your top-rated or best-selling products, it builds confidence and drives conversions.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-c3459eb3 wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Sale Products Display<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Got items on discount? Show them prominently:<\/p>\n\n\n\n<div class=\"wp-block-group has-border-color has-white-background-color has-background is-layout-constrained wp-container-core-group-is-layout-c4e40edf wp-block-group-is-layout-constrained\" style=\"border-color:#e7e7e7;border-width:1px;border-radius:12px;padding-top:25px;padding-right:25px;padding-bottom:25px;padding-left:25px\">\n<pre class=\"wp-block-code\"><code>&#91;sale_products limit=\"8\" columns=\"3\"]<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Remember to set sale prices in your product data. That sale price field overrides the regular price, so double-check those numbers before publishing.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Making It All Work Together<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-f26e22bd wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">The real magic happens when you combine these shortcodes strategically throughout your store. Here&#8217;s how I typically structure a homepage:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Recent products at the top (always fresh content)<\/li>\n\n\n\n<li>Featured products in the middle (your hero items)<\/li>\n\n\n\n<li>Best sellers near the bottom (social proof)<\/li>\n\n\n\n<li>Product categories in the footer (easy navigation)<\/li>\n<\/ol>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">For category pages, I&#8217;ll often add related categories at the bottom to encourage browsing. Blog posts get relevant product shortcodes embedded naturally in the content.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Performance Matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One thing to watch: shortcodes are convenient, but they do create database queries. If you&#8217;re running a massive catalog, too many shortcodes on one page can slow things down.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep your product limits reasonable, and consider caching if you&#8217;re dealing with high traffic. Most quality hosting providers handle this automatically, but it&#8217;s worth knowing about.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-container-core-group-is-layout-321e9cc9 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Shortcodes might seem simple, but they&#8217;re one of the most practical tools in your WooCommerce toolkit. They give you the flexibility to display products however you want, wherever you want, without touching code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start with the basics \u2013 try adding a products shortcode to your homepage. See how it looks, adjust the attributes, experiment with different layouts. Once you&#8217;re comfortable, you can create really sophisticated product displays that would otherwise require custom development.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The best part? Everything updates automatically. Change a product price, mark something as featured, add a new item \u2013 your shortcodes reflect those changes instantly across your entire site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s the power of working smart instead of hard. Your store gets professional functionality, you save time, and your customers get a better shopping experience. Everybody wins.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Running a WooCommerce store? Then you&#8217;re sitting on a goldmine of functionality that most store owners completely overlook. I&#8217;m talking about shortcodes \u2013 those little bits of code that can transform your store&#8217;s presentation without touching a single line of PHP. After helping dozens of online stores optimize their WooCommerce setup, I&#8217;ve learned that shortcodes [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1665,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-1604","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/posts\/1604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/comments?post=1604"}],"version-history":[{"count":5,"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/posts\/1604\/revisions"}],"predecessor-version":[{"id":1981,"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/posts\/1604\/revisions\/1981"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/media\/1665"}],"wp:attachment":[{"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/media?parent=1604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/categories?post=1604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stackwc.com\/wp-json\/wp\/v2\/tags?post=1604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}