Home Forums Trusted Remove login and shopping cart icons from home page

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3509
    kirsty
    Participant

    I realise this question has been asked before but the solution offered of uninstalling woocommerce isn’t going to work for me.

    My website serves my business mostly to advise of the service I provide (face-to-face speech therapy) and as a small secondary I have some online sales related to that service. I still want to be able to sell some items from my website through the ‘shop’ page but I don’t want either the login or the shopping cart and $0.00 icons to be displayed on the header of all pages, particularly the home page. I feel like this is really confusing for potential customers who have reached my website to enquire about face-to face speech therapy. Is there a way to remove these icons without getting rid of woocommerce entirely?

    #3511
    Yazmin
    Keymaster

    To hide the login & cart from the homepage only, copy this into Customize > Additional CSS:

    .home .top-login,
    .home .top-cart {
        display: none;
    }

    If you want to hide login & cart on any other page, you would use the page ID like so:

    .page-id-23 .top-login,
    .page-id-23 .top-cart {
        display: none;
    }
    #3512
    kirsty
    Participant

    This worked beautifully. Thanks so much!!!

    #3555
    Lizna
    Participant

    Good day

    I used the above mentioned methods to remove the cart and user menu from all my pages. I am using the store only as a catalog and it’s still displaying when I browse products on the shop: http://www.kidzcandy.co.za/shop/ I tried adding a page to see if I can work around this by adding a new page to display all categories http://www.kidzcandy.co.za/candy-shop/ but when I click on them the cart and user menu pops back up. Please advise. TIA

    #3556
    Yazmin
    Keymaster

    Hello Lizna, in your case the above code doesn’t work for the /shop/ page as it is a special archive page created by WooCommerce and does not have a page ID in the body class.

    so, to hide login & cart from /shop/ page (and any other special WooCommerce pages) you could use this:

    .woocommerce-page .top-login,
    .woocommerce-page .top-cart {
        display: none;
    }

    and as you are using your store only as a catalog, you could simply hide login & cart from everywhere like so:

    .top-login,
    .top-cart {
        display: none;
    }

    BTW I love the color scheme you are using with the theme!!

    #3558
    Lizna
    Participant

    Thank you! And thank you for the code, it’s perfect now

    #3629
    kirsty
    Participant

    I’m having a similar issue in that I have used the given codes to remove the shopping cart and log in from all pages (thanks for your help), but it is still present on individual blog posts, i.e. not on the ‘blog’ page but when I click on a specific post to read it the shopping cart and login is displayed at the top again.

    https://www.soundsgoodspeechtherapy.co.nz/

    Thanks in anticipation!

    #4021
    Andy
    Keymaster

    Hello Kirsty

    Sorry for taking so long to answer your query. We didn’t see your post until just now!

    You will need to also add the following to remove cart & login from individual blog posts:

    .single-post .top-login,
    .single-post .top-cart {
        display: none;
    }
    #6727

    Any chance to remove just one item from dropdown login/registration menu say “login” ? Wes

    #6728
    Andy
    Keymaster

    @wieslaw-prugargmail-com – you want to hide only the login but keep the cart icon?

    Simply remove the part of the code that affects the cart, so you would use this:

    .top-login {
        display: none;
    }
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Remove login and shopping cart icons from home page’ is closed to new replies.