• Resolved jeremycoincapital

    (@jeremycoincapital)


    Hello,

    I tried a loto of solution for remonvig the cart icon from header.

    – adding php in functions, for exemple :

    function remove_nav_cart_link () {
        remove_action( 'woo_nav_inside', 'woo_add_nav_cart_link', 20);
    }
    add_action( 'after_setup_theme', 'remove_nav_cart_link' );

    – adding css, for exemple :

    .header_top .top_nav .header_socials a.cart_count { display: none !important; }
    #top .wc-nav li.cart {display: none !important;}#top .wc-nav li.checkout{display: none !important;}
    #Top_bar a#header_cart { display:none }

    etc…
    – searching in Customize > Layout > WooCommerce ( but not present ) or in other menus (found nothing )
    – trying to modify my theme “Go to \wamp64\www\….\wp-content\themes\yourtheme\includes\header-top-bar-right and comment a line” but woocommece didn’t change my theme files when i installed, so the ligne to fix doest exist.

    Thanks a lot for your help

Viewing 6 replies - 1 through 6 (of 6 total)
  • The best way to make this change is in your theme.

    You will need to add some custom CSS: Under **Customize > Additional CSS**, add the code below but replace CART CLASS NAME with your theme’s CSS selector for the cart:

    
    CART CLASS NAME {
        display: none;
    }

    If you’d like to learn more about CSS, I highly recommend using the free tutorials at w3schools. Here, you can find the basics of selectors and more.

    If you still have the problem, please post the url to a relevant page.

    Thread Starter jeremycoincapital

    (@jeremycoincapital)

    Ok, how can i get this “CART CLASS NAME” then ?

    Changing the Theme is not possible, it would require weeks of work to remake the site

    The site is coincapital.fr

    Try this custom css:

    body .main-navigation .primer-wc-cart-menu {
      display: none !important;
    }

    Custom css should be entered at:
    Dashboard > Appearance > Customize > Additional CSS

    Please check round your other pages and on mobile for unwanted side effects.

    Thread Starter jeremycoincapital

    (@jeremycoincapital)

    Super !! It works.

    A very big Thank You sir.

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Happy to see @lorro helped out here after @marinapape’s initial help.

    I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Card incon from main menu’ is closed to new replies.