How to Add and Remove Cart Icons from Divi Menu

by | Sep 1, 2026 | Divi Tutorials | 0 comments

Every successful WooCommerce store has one thing in common – shoppers always know exactly where their cart is. That tiny icon in your header has more use than it may appear. 

Visible carts show how many items are waiting, give shoppers a shortcut to checkout, and give reassurance that a user’s products are still there as they browse. Misconfigure it in Divi, and you can end up with a disappearing cart on mobile, a lonely icon with no item count, or a header that behaves nothing like the one you tried to build.

In our mini masterclass, you’ll see how to add, style, and control the cart icon in Divi using the Menu module. Add to this a soupçon of smart CSS and purpose-built tools for dropdowns, mini-carts, or side carts, and your designs can actually match the ones in your dreams!

5 key takeaways

  • Most broken cart issues come from mixing up Divi’s default header and Theme Builder, not from WooCommerce itself.
  • Treat the cart icon as a UX pattern – users expect it in specific places with an item count, and anything less can mean losing a sale.
  • CSS tweaks turn the default cart into a branded UI element, but debugging one problem can take much longer than expected.
  • Mini-carts and side carts are a conversion aid, quietly cutting steps between browsing and checkout.
  • When advanced behavior matters more than tinkering, a purpose-built cart tool like Divi Cart Module is usually the best option.

How to set up the shopping cart on the Divi menu 

Before switching icons on and off like a light show, you need a reliable base configuration. This section focuses on Divi’s native Menu module in the Theme Builder, where you control whether the WooCommerce-style cart icon appears, what it shows, and how it behaves across devices.

How to add the cart icon to the Divi menu

WooCommerce cart icon

To add the cart icon without installing another plugin, start in the Divi Theme Builder:

1. Edit your Global Header, then open the Menu module that powers your navigation. 

2. In the Content tab, scroll to Elements and flip Show Shopping Cart Icon to Yes

Enabling cart icon in Divi

3. Divi injects a clickable WooCommerce cart icon that automatically links to your cart page. Here’s a basic example below, with both the icon and cart quantity enabled:

Divi menu with cart icon and quantity

Because this toggle controls the actual markup, turning it off is the cleanest way to remove the cart. Switch Show Shopping Cart Icon to No, and the HTML disappears completely instead of being visually hidden, which keeps your header lighter and avoids having to add extra CSS overrides.

How to display cart quantity in your menu 

Once the cart icon is enabled in the Menu module, you can turn on the item count using the Show Cart Quantity toggle under Content > Elements. This tells Divi to output the cart total next to the icon so shoppers always know what’s waiting for them – even if they’re mid-browse.​

Enabling cart quantity in Divi

You can style this count in the Design tab under the Cart Quantity Text controls. Here you can adjust font family, weight, size, and color to match your header typography. Because Divi outputs the quantity using PHP when the page loads, it updates on reload or navigation, not through live Ajax requests. 

Divi’s Cart Quantity Text controls

If you need instant updates without page reloads, you’ll want to pair your header with a dedicated Ajax cart solution – we’ll come to that option shortly, so sit tight!

Fixing cart icon visibility on mobile 

If your cart icon looks perfect on desktop but vanishes on tablet or mobile, you are not cursed – Divi’s breakpoints and container settings are usually the cause. Many cart icons use absolute positioning inside a row that hides overflow, so the icon slips outside the visible area below 980px.​

Open the Row that contains your Menu module, go to Advanced > Visibility, and set both Horizontal and Vertical Overflow to Visible so the icon can render outside the row’s box. 

Configuring visibility for cart icon

If the cart is still missing, inspect the element with browser dev tools and look for display: none or visibility: hidden applied at mobile breakpoints, then override those with a targeted media query using display: block !important and visibility: visible !important on the cart container.

How to style your cart icon with CSS 

Divi’s built-in controls handle basic styling, but CSS is where your cart icon starts to look like it belongs on a modern store rather than something dragged in by a particularly vicious house cat. 

With a few small snippets, you can swap the icon, add notification-style badges, and create hover states that feel responsive and intentional.​ Just go to Divi > Theme Options > General > Custom CSS to add universal styling to your cart icon.

Below are some practical examples you can adapt. Class names are illustrative – you can update them to match the actual selectors from your site’s header.

1. Swap the cart for a shopping bag icon

Use a custom icon font or Unicode character to replace the default Divi cart glyph:

Changing cart icon to shopping bag

/*
/* Replace default cart icon with a shopping bag icon (Divi icon font) */
.et_pb_menu__cart-button:after {
  content: "\e013";        /* Divi shopping bag icon example */
  font-family: "ETmodules";
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
}
*/

This overrides the default icon while keeping the existing cart link and quantity logic intact.​

2. Create a circular quantity badge

Creating circular quantity badge

Wrap the quantity in a compact, high-contrast badge anchored to the icon corner:

/*
/* Keep cart icon + quantity in a single horizontal row */
.et_pb_menu__cart-button {
  display: inline-flex;
  align-items: center;
  position: relative; /* for future tweaks if needed */
}

/* Quantity "pill" badge that stays beside the icon */
.et_pb_menu__cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;          /* space between icon and number */
  background: #ff3b30;
  color: #ffffff;
  border-radius: 999px;      /* pill / circular depending on content width */
  min-width: 18px;
  height: 18px;
  padding: 0 6px;            /* adjust for more/less pill length */
  font-size: 11px;
  line-height: 1;
}

/* Optional: tighten default "Items" text spacing */
.et_pb_menu__cart-count .woocommerce-Price-amount,
.et_pb_menu__cart-count span {
  line-height: 1;
}
*/

This mirrors the notification bubbles users see in mobile apps, making the item count hard to miss.​

3. Add a subtle hover animation

Changing cart color on hover

Give shoppers a quick ‘yep, that sure is clickable’ confirmation without turning your header into a carnival:

/*
/* Base cart icon color (optional) */
.et_pb_menu__cart-button {
  color: #000000; /* default icon color */
  transition: color 0.15s ease;
}

/* Make the icon glyph follow the link color */
.et_pb_menu__cart-button:after {
  transition: color 0.15s ease;
}

/* Pink on hover */
.et_pb_menu__cart-button:hover,
.et_pb_menu__cart-button:hover:after {
  color: #ff4b8b; /* pink hover color */
}
*/

You can extend this with a soft glow or background highlight by adding the following:

/*
/* Ensure icon can glow */
.et_pb_menu__cart-button,
.et_pb_menu__cart-button:after {
  display: inline-block;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* Strong, obvious glow on hover */
.et_pb_menu__cart-button:hover,
.et_pb_menu__cart-button:hover:after {
  color: #ff4b8b; /* glow color */
  text-shadow:
    0 0 4px rgba(255, 75, 139, 0.9),
    0 0 10px rgba(255, 75, 139, 0.8),
    0 0 18px rgba(255, 75, 139, 0.7);
}
*/

On hover, you’ll gain a subtle glow, on top of the cart changing color:

Adding glow to cart and cart quantity

These micro-interactions keep the cart feeling alive while staying lightweight and easy to maintain.

Better options for upgrading your cart icon 

Native Divi plus CSS gets you a respectable cart icon, but it still behaves like a basic link. You don’t get a true mini-cart dropdown, side cart, or consistent Ajax updates across product and archive pages, which is where most users experience problems. 

Divi Life homepage

This is where purpose-built tools are essential, such as dedicated cart modules and mega menu builders that treat the cart as an interactive component, as opposed to treating it as purely decorative. Luckily, Divi Life has plugins that let you implement these easily into your store.

Divi Cart Module

Divi Cart Module homepage

The Divi Cart Module from Divi Life gives you a true cart component instead of a bolted-on icon. Because it’s a standalone module, you can drop it into any Divi layout. 

Divi Cart Module example

Use it on Theme Builder headers and footers, sidebar templates, promotional sections, or even long-form sales pages where you want the cart visible near key CTAs.​

The Divi Cart Module’s biggest bonus over native Divi is Ajax behavior. The cart count and totals update instantly when shoppers add or remove items, so they always see accurate information without needing page reloads.”

– Jennifer Rodriguez, Lead Designer at Divi Life

Cart updating when product added

You control icon style, text, alignment, and hover states using familiar Divi Design tab options, including colors, spacing, borders, and animations. 

Divi Mega Pro 

Divi Mega Pro homepage

Divi Mega Pro fills the mini-cart gap by turning your cart icon into a hover or click-activated dropdown panel powered entirely by the Divi Builder. 

Instead of sending users straight to the cart page, you can reveal a custom mini checkout hub that shows products, quantities, totals, and key checkout links in one place.​

Mega Menu for Divi Cart popup

Because the dropdown content is a regular Divi layout, you control exactly what appears. This includes order summaries, cart subtotal, ‘View Cart’ and ‘Checkout’ buttons, plus extras like free shipping progress bars, low-stock notices, or cross-sell product grids. 

This setup cuts down on the number of clicks required to purchase and lets shoppers confirm their cart without losing their place on the page.

Oh and did we mention that Divi Mega Pro has been fully rebuilt for Divi 5! It is seamlessly integrated into the new Divi 5 interface, and it is as gorgeous as it is smooth and buttery!

Do More with Divi Mega Pro!

Create beautiful & functional mega menus & mega tooltips with Divi Mega Pro, complete with included templates & advanced functionality. 🔥

Add a cart to your menu that converts

As we’ve seen, a high-performing cart icon does three jobs at once – it shows shoppers what they’ve added, gives them a clear path to checkout, and looks like it belongs in a modern store. 

For best results, start with the basics – enable the cart in the Menu module’s Elements settings and turn on the quantity display so visitors always see their item count at a glance. From there, decide how far you need to go. 

If you only care about looks, custom CSS can handle icon swaps, badges, and hover effects. If you care about conversions, speed, and real-time feedback, unleash a dedicated tool to handle the hard work for you. 

Check out Divi Cart Module or Divi Mega Pro for truly conversion-ready cart experiences that improve your workflows and keep your customers precisely where you want them!

Do More with Divi Mega Pro!

Create beautiful & functional mega menus & mega tooltips with Divi Mega Pro, complete with included templates & advanced functionality. 🔥

0 Comments

Submit a Comment

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