• Hello everyone,

    i use Storefront theme with Woocommerce plugin and now i’m trying to remove cart button from the menu (as i don’t need it to be visible at all and i’m not planning to use the cart).

    I’ve tried many solutions proposed here, but none of them worked.

    As far as i understand, i simply need to remove this code (between site-navigation and musthead closing tags):

    </nav><!-- #site-navigation -->
    				<ul class="site-header-cart menu">
    			<li class="">
    					<a href="https://new.vse-detali.net/?page_id=18" title="Посмотреть корзину">
    				0.00руб. <span class="count">0 шт.</span>
    			</a>
    
    			<div class="widget woocommerce widget_shopping_cart"><div class="widget_shopping_cart_content"></div></div>		
    
    		</div>
    	</header><!-- #masthead -->

    But the problem is that i can’t find it on the server ?? Could anyone please tell me the full path to this file (and its name), so that i could remove this code?

    Txs a lot!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi poppy_coloured, if you will use woocommerce as a product catalog only there’s a plugin that can do this easily.

    Please install Catalog Visibility Options plugins.
    And there will be an option there under woocommerce setting if you want to disable the cart, prices, etc.

    try adding this to your style.css on your child theme..

    .site-header-cart .cart-contents {
      display: none;
    }
    
    .site-header-cart.menu {
      z-index: -1;
    }

    Insert the code below to the style.css on your child theme. Worked perfect for me.

    .woocommerce-active .site-header .site-header-cart {
    display: none;
    }

    But remember, it will ride the cart, not remove the function.

    The correct way to do this would be something like this;

    add_action( 'init', 'jk_remove_header_cart' );
    function jk_remove_header_cart() {
    remove_action( 'storefront_header', 'storefront_header_cart', 60 );
    }

    Thanks

    None of these solutions work for me. I am at a 2 week google search loss on how to remove the cart from the menu. Why is removing the cart icon from the menu so difficult? If anyone can offer any advice, I would be forever grateful.

    If it matters, I am running the Minamaze Pro theme, using a child them.

    @kevinnations

    This is the Storefront forum, for help with a different theme I recommend posting on the appropriate forum ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove cart button from the menu’ is closed to new replies.