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

This topic contains 7 replies, has 4 voices, and was last updated by  Andy 2 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 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;
    }
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.