Website Building » WooCommerce » Firstly, You Need to Activate the WooCoomerce Plugin to Display the WooCommerce Cart Icon in Menu Bar….How to Display the WooCommerce Cart Icon in Menu Bar?

Firstly, You Need to Activate the WooCoomerce Plugin to Display the WooCommerce Cart Icon in Menu Bar….How to Display the WooCommerce Cart Icon in Menu Bar?

Last updated on January 17, 2023 @ 4:26 pm

If you’re running a WooCommerce store, then you probably want to display the WooCommerce cart icon in your menu bar. There are a few different ways to do this, but the easiest way is to simply activate the WooCommerce plugin.

Once you’ve activated the WooCommerce plugin, you’ll need to go to the “WooCommerce” settings page and enable the “Show Cart Icon in Menu Bar” option.

Once you’ve done that, the WooCommerce cart icon will be displayed in your menu bar. You can then style it using CSS to match your site’s design.

If you want to take things a step further, you can also add a “Cart” link to your menu bar. This will allow people to click on the link and be taken directly to your WooCommerce cart page.

PRO TIP: If you do not activate the WooCommerce plugin, the WooCommerce cart icon will not display in the menu bar.

To add a “Cart” link, you’ll need to edit your theme’s header.php file and add the following code:

<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="cart-link"><?php _e( 'Cart', 'woocommerce' ); ?></a>

Once you’ve added that code, you’ll need to style the link using CSS. You can find some example CSS code below:

cart-link {display: inline-block;
padding: 10px;
background: #333;
color: #fff;}
.cart-link:hover {background: #444;}

Adding the WooCommerce cart icon to your menu bar is a great way to make it easy for people to find and use your store’s shopping cart. And with a little bit of CSS, you can style it to match your site’s design perfectly.

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.