Woocommerce Navbar Cart in different Menu

Hi, I am trying to move the Woocommerce Navbar Cart to a different menu. I found this old post from 2017 about it but the code suggested breaks my site, probably because it is outdated. Does anyone know what code I could use for the current Xtheme Pro or if there is a better way to accomplish this now?

Hi @allshookup,

Thanks for reaching out.
I would suggest you create two different headers using the Header Builder which is available with the Pro you are using. One header without Cart and another one with Cart and assign it to the WooCommerce pages using the Condition. I would suggest you go through the following article on the Header Builder and Condition and Assignment.



Hope it helps.
Thanks

That would possibly work if I was using a single menu on the page. What I am doing is adding a second menu to the store pages for added navigation. Please see the picture. I would like to be able to add the default navbar cart to the second menu not the main menu in the header.

Hi @allshookup,

If you want to add the cart to the second menu, the suggestion above by my colleague will do the trick. All you need to do is create 2 bars then add a condition to show them to a specific page.

The structure should look like this one.

First Bar is your main navigation this will show to the entire page, then in the first bar add the cart element to not show in the shop page.

The second bar is your second menu where you add the add cart element and this bar will only be shown on the shop page. To do that, you just need to add an element condition.

image

Hope that helps.

I understand setting up two different menus using the header builder and conditions. How would that solve turning on the WooCommerce Navbar Cart in the XPro theme options? When you toggle (activate) the WooCommerce Navbar Cart in the XPro theme it automatically places the cart in the “Primary Menu”. I want to show it in one of my custom header menus.
Screen Shot 2021-12-13 at 10.43.05 AM

Hi @allshookup,

The Navbar Cart option only add the Cart into the Primary menu. But you can use the Cart elements like Cart Dropdown, Mini Cart, etc. to add the cart into the Custom Header.

Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.