Hide Cart From Homepage Only

Hey, I need assistance to remove the cart button from the home page only, while it stays on every other page. Is there a way to achieve this?

1 Like

Hi,

Good morning,

Welcome to the shopify ,

Please share your store URL and if your store is password protected then also provide password too.
Thank you.

Hey @maestrosw

Follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above </ body> tag
{% if template == 'index' %}
<style>
cart-icon.header-actions__cart-icon {
    display: none !important;
}
</style>
{% endif %}

RESULT:

If I managed to help you then a Like would be truly appreciated.

Best,
Moeed

1 Like

From your store admin > Sales channels > Online store > Themes > Edit theme > Homepage > Under Template > click Add section > Custom Liquid section, add this code to Liquid and click Save.

<style>
cart-drawer-component { display: none !important; }
</style>

Best regards,
Dan from Ryviu: Product Reviews App

1 Like

This worked, thanks.

What if I also wanted to remove the profile icon from the home page?