如何在Shopify特定集合页面移除商品价格及隐藏指定商品价格?
Hey there! Let's break down how to tackle each of your Shopify price-hiding needs step by step—all using native Shopify tools so you don't need external apps. Keep in mind that theme file names can vary a bit depending on your Shopify theme (e.g., Dawn uses different section names than Debut), so if you can't find the exact files mentioned, look for elements with classes like product-price or price in your theme's code.
You have two solid options here—pick whichever fits your theme's setup better:
Option 1: Use Liquid Conditional Logic
- Go to your Shopify Admin → Online Store → Themes → Actions → Edit Code
- Find the file that renders product prices in collections—this is usually in
Sections/collection-template.liquid,Sections/product-grid-item.liquid, orSnippets/product-price.liquid - Wrap the price element code with a conditional check for your target collection. For example:
Replace{% unless collection.handle == 'sale-items' %} <!-- Your existing price rendering code here (e.g., {{ product.price | money }}) --> {% endunless %}sale-itemswith your actual collection handle (you can find this in the collection's URL, e.g.,your-store.myshopify.com/collections/sale-items→ handle issale-items)
Option 2: Use Custom CSS
- In your theme editor, go to Actions → Edit Code → Assets → theme.scss.liquid (or base.css, depending on your theme)
- Add this CSS at the bottom:
Most Shopify themes automatically add a/* Hide prices on the "sale-items" collection */ .collection-handle-sale-items .product-price { display: none !important; }.collection-handle-{{handle}}class to the body tag of collection pages. Swapsale-itemswith your collection's handle to target the right page.
If you want prices removed from every collection, search results, and other product grid pages:
Method 1: Remove Price Code Globally
- Edit your theme code and locate the snippet/section that renders product prices (same files referenced above)
- Either delete the price-related code entirely, or comment it out using Liquid comments to keep it for later:
{% comment %} <!-- Commented out to hide product prices --> <div class="product-price"> {{ product.price | money }} </div> {% endcomment %}
Method 2: Global CSS Hide
Add this to your theme's main CSS file (theme.scss.liquid or base.css):
/* Hide all product prices in lists */ .product-price { display: none !important; }
To target individual products in any collection, use Liquid to check for unique product identifiers like handles or tags:
Option 1: Target by Product Handle
- Open the file that renders individual products in the collection grid (e.g.,
Sections/product-grid-item.liquid) - Wrap the price element with a conditional that excludes your target products:
Add as many{% unless product.handle == 'custom-handmade-vase' or product.handle == 'limited-edition-print' %} <!-- Your price rendering code here --> {% endunless %}or product.handle == 'xxx'clauses as needed for each product you want to hide prices for.
Option 2: Target by Product Tag
- First, add a tag like
hide-priceto the products you want to modify (Shopify Admin → Products → edit the product → add the tag under "Organization") - Then use this Liquid code in your collection product grid file:
{% unless product.tags contains 'hide-price' %} <!-- Your price rendering code here --> {% endunless %}
This will hide prices for any product with the hide-price tag, regardless of which collection it appears in.
内容的提问来源于stack exchange,提问作者Tasneem

