If you run an online store on WordPress, the WooCommerce cart shortcode is one of the most useful little tools in your toolkit. With just , you can display a fully functional shopping cart anywhere on your site — no coding, no complicated page builder gymnastics. But most store owners barely scratch the surface of what this shortcode can do.
In this friendly, no-fluff guide, we’ll walk through 9 powerful ways to use the WooCommerce cart shortcode in 2026, from quick setup to advanced customization that can actually boost your conversions.
Key Takeaways
- Use to display a fully functional cart on any page, post, or widget.
- Always assign your cart page in WooCommerce settings to avoid checkout redirect errors.
- Use the mini cart shortcode for headers, popups, and mobile menus where space is tight.
- Optimize the cart for mobile — over 70% of eCommerce traffic now comes from phones.
- Pair the cart shortcode with trust badges, related products, and free shipping bars to boost conversions.
Table of Contents
- 1. What the WooCommerce Cart Shortcode Actually Does
- 2. Add the Cart Shortcode to a New Page
- 3. Fix a Missing or Broken Cart Page
- 4. Display the Cart Inside a Sidebar or Widget
- 5. Use the Mini Cart Shortcode for Quick Access
- 6. Style the Cart for a Branded Look
- 7. Embed the Cart Inside a Popup or Slide-Out
- 8. Optimize the Cart Shortcode for Mobile Shoppers
- 9. Combine the Cart Shortcode With Conversion Tactics
- FAQ

1. What the WooCommerce Cart Shortcode Actually Does
The WooCommerce cart shortcode — written as — is a built-in shortcode that displays the entire cart page on any post, page, or widget area where shortcodes are supported. When customers add products to their cart, this shortcode renders the items, quantities, totals, coupon field, and the checkout button automatically.
WooCommerce installs this shortcode on the default “Cart” page during setup. But you can drop it anywhere — landing pages, custom templates, even inside Elementor or Gutenberg blocks. For more shortcode options beyond the cart, our complete WooCommerce shortcodes guide covers every official option.
According to the official WooCommerce shortcode documentation, this is the canonical way to render cart content outside of block-based themes.
2. Add the Cart Shortcode to a New Page
Adding the cart shortcode to a new page takes about 30 seconds. Here’s how:
- Go to Pages → Add New in your WordPress dashboard.
- Title the page “Cart” (or whatever you prefer).
- Add a Shortcode block (or Classic block) and paste
. - Click Publish.
- Navigate to WooCommerce → Settings → Advanced and assign your new page as the Cart Page.
That last step is critical — WooCommerce uses the assigned cart page for redirects after “Add to Cart” actions. If you skip it, customers may still land on your old cart page.
3. Fix a Missing or Broken Cart Page
One of the most common WooCommerce support issues is a cart page that displays “Your cart is currently empty” — even when products have been added. Nine times out of ten, the cart shortcode is missing, misspelled, or replaced by a stray block.
To fix it:
- Edit your Cart page.
- Remove any existing content blocks.
- Add a fresh Shortcode block with
. - Clear your site cache and test by adding a product.
If the cart still acts strangely, conflicting plugins or themes are usually the culprit. Our best WooCommerce plugins guide highlights tested, conflict-free tools we recommend.
4. Display the Cart Inside a Sidebar or Widget
Want shoppers to always see what’s in their cart? You can place the WooCommerce cart shortcode inside a sidebar widget. Go to Appearance → Widgets, add a Shortcode or Custom HTML widget, and paste .
Keep in mind that the full cart shortcode is heavy — it renders the entire cart table. For sidebars, the mini cart (covered next) is usually a better fit. But for storewide promotional pages or recovery campaigns, a full sidebar cart can dramatically reduce abandonment.
5. Use the Mini Cart Shortcode for Quick Access
While shows the full cart, the mini cart shortcode ([woocommerce_mini_cart] via the Mini Cart block or PHP) is perfect for headers, floating buttons, and popups. It shows just the essentials: item count, thumbnails, and a checkout link.
Mini carts work best for:
- Sticky headers that follow shoppers as they scroll
- Mobile menus where space is tight
- Slide-in cart drawers for a Shopify-like feel
If you’re weighing platform features here, our breakdown of WooCommerce vs Shopify vs Wix compares cart UX across all three.
6. Style the Cart for a Branded Look
The default cart styling is functional but plain. To match your brand, add custom CSS through Appearance → Customize → Additional CSS. Common tweaks include:

- Updating the “Proceed to Checkout” button color to match your CTA palette
- Increasing product thumbnail size for better visibility
- Adding subtle background colors to coupon and totals sections
- Improving table spacing on desktop
For example, to recolor the checkout button:
.wc-proceed-to-checkout .checkout-button { background-color: #ff6b00; color: #fff; }
Resources like WordPress Developer Docs can help if you want to override cart templates entirely.
7. Embed the Cart Inside a Popup or Slide-Out
Modern shoppers love instant feedback. When someone clicks “Add to Cart,” a slide-out drawer or popup that displays cart contents (using the cart shortcode) keeps them in the buying flow without forcing a full page reload.
You can build this with popup plugins like Popup Maker or Elementor Pro popups. Inside the popup container, paste or the mini cart shortcode. Trigger the popup on the added_to_cart event for a smooth experience.
This single change can meaningfully reduce cart abandonment — and pairs nicely with the tactics in our WooCommerce CRO checklist.
8. Optimize the Cart Shortcode for Mobile Shoppers
Over 70% of eCommerce traffic in 2026 is mobile, according to Statista’s mobile commerce data. If your cart shortcode renders into a clunky horizontal-scrolling table on phones, you’re losing money.
Quick wins:
- Add responsive CSS to stack cart rows vertically on screens under 600px
- Hide non-essential columns (like SKU) on mobile
- Make the “Update Cart” and “Checkout” buttons full width
- Use sticky “Proceed to Checkout” buttons that float at the bottom of the screen
A mobile-friendly cart is one of the highest-ROI changes you can make this quarter.
9. Combine the Cart Shortcode With Conversion Tactics
The cart page is one of the highest-intent pages on your store — shoppers here are already considering buying. That makes it the perfect place to add:
- Trust badges (secure checkout, money-back guarantee, payment logos)
- Related product recommendations — see our related products in WooCommerce guide
- Free shipping progress bars (“Add $12 more for free shipping”)
- Coupon banners with auto-apply codes
- Urgency timers for limited-time discounts
You can place these above or below the shortcode using Gutenberg blocks. Each one nudges shoppers closer to checkout without feeling pushy.
Final Thoughts
The WooCommerce cart shortcode is deceptively simple. Drop it on a page, and you have a functional cart. But used strategically — across sidebars, popups, mobile layouts, and conversion-focused pages — it becomes a real revenue lever. Start with the basics, test variations, and remember that every small improvement to your cart experience compounds over time.
Frequently Asked Questions
What is the WooCommerce cart shortcode?
The WooCommerce cart shortcode is . It displays a full functional shopping cart — including items, quantities, totals, coupons, and the checkout button — anywhere shortcodes are supported.
Why is my WooCommerce cart shortcode not working?
The most common causes are a missing or misspelled shortcode, a caching plugin showing an outdated page, or a theme/plugin conflict. Re-add the shortcode in a fresh block, clear your cache, and test in incognito mode.
Can I use the cart shortcode on multiple pages?
Yes, you can place on multiple pages, but only one page should be assigned as the official Cart page under WooCommerce → Settings → Advanced to avoid redirect conflicts.
What’s the difference between the cart and mini cart shortcodes?
The cart shortcode renders the full cart table with quantity editors and totals. The mini cart is a compact widget showing just item count, thumbnails, and a checkout link — perfect for headers and popups.
Can I style the WooCommerce cart shortcode without coding?
Yes. Most themes and page builders like Elementor, Divi, and Bricks let you style cart elements visually. For deeper changes, simple CSS added via Appearance → Customize handles most branding tweaks.
