Solved

How to hide the price of products on both home page and collections page, Dawn theme 11.0.0

ViktorS7
Tourist
6 0 2

Hello, I want to hide the prices of my products on both home page collection, and all the other collections on Shopify Dawn Theme 11.0.0 , I've been trying to put old codes but they dont seem to work. Please help.

Accepted Solution (1)
NadiaAnthony
Shopify Partner
74 11 14

This is an accepted solution.

For the homepage featured product: Navigate to Online Store > Themes > Customize. Click on the Featured Product section and hide the "Price" block by clicking on the eye that appears on the right hand side when you hover over it.

 

To hide on Featured Collections or Main Collections page you'll need to do some custom coding. Navigate to Online Store > Themes > "..." Edit Code. Find the snippet file titled "price.liquid". Around line 50, after the " BUT before the > you'll add:

 {% if template.name contains "collection" or template.name contains "index"  %} style="display: none;" {% endif %}

 

So that whole chunk of could should look like: 

<div
  class="
    price
    {%- if price_class %} {{ price_class }}{% endif -%}
    {%- if available == false %} price--sold-out{% endif -%}
    {%- if compare_at_price > price and product.quantity_price_breaks_configured? != true %} price--on-sale{% endif -%}
    {%- if compare_at_price > price and product.quantity_price_breaks_configured? %} volume-pricing--sale-badge{% endif -%}
    {%- if product.price_varies == false and product.compare_at_price_varies %} price--no-compare{% endif -%}
    {%- if show_badges %} price--show-badge{% endif -%}
  " {% if template.name contains "collection" or template.name contains "index"  %} style="display: none;" {% endif %}
>

 

I help brands bridge the gap between complicated code and clear communication.

View solution in original post

Replies 3 (3)

NadiaAnthony
Shopify Partner
74 11 14

You should be able to hide the price in the WYSIWYG editor. Navigate to Online Store > Themes > Customize. Click on the Product section and hide the "Price" block by clicking on the eye that appears on the right hand side when you hover over it. You may have to repeat this process again on the product pages in addition to the featured product or collection just once. It should apply to all products if they use the same template.

I help brands bridge the gap between complicated code and clear communication.
ViktorS7
Tourist
6 0 2

No, I dont want it removed from product page, only to remove it from home page and collections.

 

NadiaAnthony
Shopify Partner
74 11 14

This is an accepted solution.

For the homepage featured product: Navigate to Online Store > Themes > Customize. Click on the Featured Product section and hide the "Price" block by clicking on the eye that appears on the right hand side when you hover over it.

 

To hide on Featured Collections or Main Collections page you'll need to do some custom coding. Navigate to Online Store > Themes > "..." Edit Code. Find the snippet file titled "price.liquid". Around line 50, after the " BUT before the > you'll add:

 {% if template.name contains "collection" or template.name contains "index"  %} style="display: none;" {% endif %}

 

So that whole chunk of could should look like: 

<div
  class="
    price
    {%- if price_class %} {{ price_class }}{% endif -%}
    {%- if available == false %} price--sold-out{% endif -%}
    {%- if compare_at_price > price and product.quantity_price_breaks_configured? != true %} price--on-sale{% endif -%}
    {%- if compare_at_price > price and product.quantity_price_breaks_configured? %} volume-pricing--sale-badge{% endif -%}
    {%- if product.price_varies == false and product.compare_at_price_varies %} price--no-compare{% endif -%}
    {%- if show_badges %} price--show-badge{% endif -%}
  " {% if template.name contains "collection" or template.name contains "index"  %} style="display: none;" {% endif %}
>

 

I help brands bridge the gap between complicated code and clear communication.