Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › ecommerce

WooCommerce Shortcodes: Complete List With Examples

By Freedom251 Team · · 9 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WooCommerce shortcodes are compact WordPress commands that render store functions inside a page or post. The core set covers cart, checkout, accounts, order tracking, complete product pages, product grids, categories, add-to-cart controls, and shop notices. Paste a shortcode into a Shortcode block (Block Editor) or directly into page content (Classic Editor), then configure its attributes to control products, ordering, columns, pagination, and filters.

This reference lists every core shortcode documented by WooCommerce, shows copy-ready syntax, explains which shortcode fits each job, and outlines when the newer block-based approach is a better choice.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What WooCommerce shortcodes do

A shortcode is a bracketed token that WordPress expands into dynamic WooCommerce output when the page is rendered. The output uses your current catalog, prices, stock, tax settings, customer session, and order data, so you do not hard-code changing product information into page content.

Shortcodes are useful when you need a predictable page-level component, when an extension supports shortcode hooks, or when you are maintaining an existing store built around them. They are not interchangeable: a cart shortcode creates a cart workflow, while a product-listing shortcode creates a catalog query, and an add-to-cart shortcode creates an action for one product.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Core WooCommerce page shortcodes

These shortcodes power the main customer-facing pages. Put each one on its own page unless you have a deliberate custom layout.

Shortcode What it renders Typical use
[woocommerce_cart] Cart contents, coupon entry, totals, and basic order information Cart page
[woocommerce_checkout] The checkout process Checkout page
[woocommerce_my_account] Orders and account-management screens My Account page
[woocommerce_order_tracking] A form for looking up an order by order number and billing email Optional guest order-tracking page
[shop_messages] WooCommerce notices on a normal WordPress post or page Custom landing pages that need cart or store notices

Cart

Use [woocommerce_cart] to render the cart. Customers can review line items, apply a coupon, and see the order information WooCommerce exposes at that stage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
[woocommerce_cart]

Checkout

Use [woocommerce_checkout] for the checkout page. It displays the checkout fields and payment flow configured in your store.

[woocommerce_checkout]

My Account

Use [woocommerce_my_account] for the account area. Signed-in customers see their orders and account details. Guests see a sign-in form and, if registration is enabled in the account settings, a registration form.

[woocommerce_my_account]

Guest order tracking

[woocommerce_order_tracking] is optional. It gives a guest a form to enter an order number and billing email, then view the order status and available details.

[woocommerce_order_tracking]

Shop messages on ordinary pages

[shop_messages] places WooCommerce notices on a page that is not one of the designated WooCommerce pages. This is useful for a custom campaign or information page where customers still need to see messages such as a successful add-to-cart notice or an error.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
[shop_messages]

Single-product shortcodes

Render a complete product page

[product_page] displays a full single-product view outside the normal shop or product URL. Select the item by database ID or SKU:

[product_page id="123"]
[product_page sku="TSHIRT-BLUE-M"]

Use an ID when your content is tied to a specific product record. Use a SKU when your catalog workflow treats the SKU as the stable identifier. Replace the examples with a real value from the product editor; the literal placeholders are not valid product references.

Show a price and add-to-cart button only

[add_to_cart] is the compact option when you do not need the full product page. It outputs the product price and an add-to-cart button. Supply the product ID:

[add_to_cart id="123"]

This is suitable for a buying guide, comparison page, or campaign section that already contains the product name and explanation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Return an add-to-cart URL

[add_to_cart_url] returns the URL that adds a product to the cart. It is intended for links or custom markup rather than a complete product presentation. Use the product ID:

[add_to_cart_url id="123"]

Because the result is a URL, style the link, button, or call to action around it in your page builder or theme. Test the resulting link with a customer session and verify that the expected variation, quantity, and redirect behavior occur.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

The [products] shortcode: one query for most product grids

[products] is WooCommerce’s flexible product-listing shortcode. It can select products by IDs or SKUs, category, tag, attribute terms, visibility, sale state, rating, and other query values, then control the grid’s order, column count, limit, and pagination.

Attribute reference

Attribute Function Documented values or behavior
limit Maximum number of products returned Documented default is -1 in the listing context, meaning no imposed maximum
columns Grid columns Default is 4
paginate Adds pagination when a limit is used Use true to enable
orderby Sort field title, date, id, menu_order, popularity, rand, rating, among others documented by WooCommerce
order Sort direction ASC or DESC
ids Select products by comma-separated IDs Use product IDs from your catalog
skus Select products by comma-separated SKUs Use exact SKU values
category Filter by category slug Comma-separated slugs are supported
tag Filter by product-tag slug Comma-separated slugs are supported
class Adds a CSS class to the wrapper Use a class defined by your theme or custom CSS
on_sale Restricts results to sale products Use true
best_selling Restricts results to best sellers Use true
top_rated Restricts results to top-rated products Use true
attribute Names the product attribute to query Pair with terms
terms Attribute terms to include or exclude Pair with attribute
terms_operator How attribute terms are matched IN, NOT IN, or AND
tag_operator How multiple tag slugs are matched IN, NOT IN, or AND
visibility Controls catalog visibility filtering Includes values such as visible and featured

Do not combine mutually exclusive state filters. WooCommerce specifically warns against pairing filters such as on_sale with best_selling or top_rated; choose the state that matches the page’s purpose.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Copy-ready product-grid examples

Four popular sale items in four columns:

[products limit="4" columns="4" orderby="popularity" class="quick-sale" on_sale="true"]

Up to four featured products in two columns:

[products limit="4" columns="2" visibility="featured"]

A category grid showing twelve recent items, with pagination:

[products category="shirts" limit="12" columns="4" paginate="true" orderby="date" order="DESC"]

Products selected by IDs:

[products ids="123,456,789" columns="3"]

Products selected by SKU:

[products skus="TSHIRT-BLUE-M,TSHIRT-BLUE-L" columns="2"]

Filter by an attribute and require all listed terms:

[products attribute="pa_color" terms="black,white" terms_operator="AND" columns="2"]

The attribute value normally uses the attribute’s taxonomy name, such as pa_color. Confirm the exact taxonomy and term slugs in your store before publishing.

Category shortcodes

Products in one or more categories

[product_category] is the category-focused product listing shortcode. Use it when your intent is explicitly “show products from this category.” A typical form is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
[product_category category="shirts" per_page="12" columns="4" orderby="date" order="DESC"]

For new layouts, the consolidated [products] shortcode can express the same category query while exposing the broader attribute set, for example:

[products category="shirts" limit="12" columns="4" paginate="true" orderby="date" order="DESC"]

Display product categories

[product_categories] displays product-category tiles or links rather than individual product cards. It is useful for a catalog landing page that lets shoppers choose a department first.

[product_categories]

Category display options vary by WooCommerce version and theme styling. If you need precise product filtering, use [products] instead of relying on category tiles.

Legacy and specialized product methods

The WooCommerce code reference also lists specialized methods corresponding to featured products, sale products, best-selling products, recent products, related products, products by attribute, and top-rated products. Older stores may contain these specialized shortcodes in page content or templates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For most new product grids, WooCommerce’s current documentation recommends consolidating the query into [products]. That gives you one syntax for state filters, categories, attributes, sorting, columns, and pagination. Before replacing a legacy shortcode, reproduce its selection rules and visual layout, then compare the rendered page on desktop and mobile.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to insert a shortcode

  1. Open the page or post where the store element should appear.
  2. In the Block Editor, insert a Shortcode block.
  3. Paste the complete shortcode, including its square brackets and quoted attributes.
  4. Replace example IDs, SKUs, slugs, and terms with values that exist in your catalog.
  5. Save or publish, then view the page as a customer. Check the product count, links, prices, stock state, and responsive columns.

In the Classic Editor, paste the same shortcode directly into the page content and update the page.

Required WooCommerce pages and shortcode placement

The WooCommerce setup wizard creates Shop, Cart, Checkout, and My Account pages. The Shop page does not need page content. Cart and Checkout use their respective store interfaces, while the My Account page contains [woocommerce_my_account]. WooCommerce may also create a draft refund-and-returns policy; that policy is recommended but not required for the shortcode pages to function.

If a cart or checkout page is blank, open the page assigned under WooCommerce’s page settings and verify that the correct page interface or shortcode is present. Also check that the page is published and that no template condition is hiding its content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Shortcodes versus WooCommerce blocks

WooCommerce describes blocks as the simplest and most flexible way to display products in current WordPress editing. Cart and Checkout Blocks became the default for new installations beginning with WooCommerce 8.3. That does not make shortcodes obsolete: an extension may support the shortcode version but not the equivalent block, or a mature store may depend on shortcode-specific hooks and styling.

Decision factor Shortcode Block
Best fit Existing pages, extension integrations, compact copy-ready embeds New layouts and visual editing in the Block Editor
Product selection Attributes such as IDs, SKUs, categories, tags, visibility, sale state, and rating Block controls and Product Collection query settings
Layout control Text attributes for columns, limits, pagination, order, and CSS class Editor controls with visual preview
Compatibility Often the safer choice when an extension documents shortcode support Verify every payment, subscription, membership, and product-add-on extension
Maintenance Legacy specialized shortcodes may need consolidation into [products] Preferred for new product collections where all extensions support blocks

Before migrating a working shortcode page, check each extension’s compatibility notes. Keep the shortcode when a required extension does not support the block equivalent or when migration would change checkout behavior.

Advanced checkout links are separate from page shortcodes

WooCommerce developer documentation also describes shareable checkout URLs. These links can pass a comma-separated product list, variation data, cart-item data, and coupon codes. They are useful for campaign links and preconfigured carts, but they are not replacements for [woocommerce_checkout] or the other page shortcodes. Treat them as a separate URL-based checkout feature and test every parameter against the current product and coupon configuration.

Troubleshooting shortcode problems

No output or the brackets appear as text

  • Confirm that you used a Shortcode block, not a Paragraph block that is being escaped by a page builder.
  • Check that every opening bracket, quote, and closing bracket is present.
  • Temporarily switch to a default theme or disable a conflicting content plugin to identify filtering that prevents shortcode execution.

The grid is empty

  • Verify category, tag, attribute, and term slugs; names shown in the editor are not always the slugs used in queries.
  • Check product catalog visibility, publication status, stock settings, and language or currency plugins.
  • For ID and SKU queries, confirm that the values belong to published products and that variable-product variations are referenced as intended.

Pagination does not appear

Pagination is enabled with paginate="true" when a finite limit is supplied. If the query returns fewer items than the limit, there is no second page to display.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Checkout or account content is missing

  • Confirm that the page assigned to Cart, Checkout, or My Account contains the corresponding interface.
  • Ensure the page is published and accessible to logged-out visitors when guest checkout or account sign-in is expected.
  • Review extension compatibility before replacing a shortcode with a block, especially after upgrading to a block-first WooCommerce installation.

Products are in an unexpected order

Set both orderby and order. For example, orderby="date" order="DESC" requests newest-first ordering; orderby="rand" intentionally changes order between requests.

Choosing the right shortcode

Your goal Use
Cart contents and coupons [woocommerce_cart]
Checkout form and payment [woocommerce_checkout]
Customer orders and account details [woocommerce_my_account]
Guest order lookup [woocommerce_order_tracking]
Full product detail page in custom content [product_page id="..."] or [product_page sku="..."]
Price and add-to-cart button [add_to_cart id="..."]
Add-to-cart link target [add_to_cart_url id="..."]
Flexible product grid [products]
Category-focused product listing [product_category] or [products category="..."]
Category navigation tiles [product_categories]
Notices on a custom page [shop_messages]

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

ecommerceShortcodesWooCommerceWooCommerce blocksWordPress

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.