Remove WooCommerce basket in header

Support Forums for LiveMesh Themes & Plugins Forums Peak Theme Support Remove WooCommerce basket in header

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20320
    milner05
    Member

    Hi,

    I’m wondering if it’s possible to remove the WooCommerce basket icon from the header? Especially if there is nothing in it.

    Thanks,

    Alan

    #20370
    Raghavendra
    Moderator

    If you do not need WooCommerce, then you can just deactivate the plugin and the cart icon will not appear.

    If you do need woocommerce, I would not recommend you keep the cart icon in shop pages at least. You can hide them in specific page (if it not something related to shopping) by using the custom CSS in theme options –

    body.page-id-.woocommerce-site #header .site-header-cart { display: none; }
    

    replace with page id of the page.

    #20375
    Veena
    Moderator

    You can add the below line of code at line no:30 in file woocommerce/cart.php

    if (WC()->cart->get_cart_contents_count() == 0)
    return;
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Peak Theme Support’ is closed to new topics and replies.