Hide Shopping Cart from One Single Page

Solved
New Member
1 0 0

How can I remove the shopping cart from an individual page, but not site wide?

0 Likes
Highlighted
Shopify Partner
41 6 13

This is an accepted solution.

You can wrap the code that is displaying the cart button/icon/info in a condition that checks if you are on a certain page.

View the docs on the page object for a list of properties that you can check against. The example below will not show the cart button on a page titled 'About'.

{% unless page.title == 'About' %}
  <button id="Cart">Cart</button>
{% endunless %}

 

0 Likes