You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在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.

1. Hide Prices on a Specific Collection Page

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, or Snippets/product-price.liquid
  • Wrap the price element code with a conditional check for your target collection. For example:
    {% unless collection.handle == 'sale-items' %}
      <!-- Your existing price rendering code here (e.g., {{ product.price | money }}) -->
    {% endunless %}
    
    Replace sale-items with your actual collection handle (you can find this in the collection's URL, e.g., your-store.myshopify.com/collections/sale-items → handle is sale-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:
    /* Hide prices on the "sale-items" collection */
    .collection-handle-sale-items .product-price {
      display: none !important;
    }
    
    Most Shopify themes automatically add a .collection-handle-{{handle}} class to the body tag of collection pages. Swap sale-items with your collection's handle to target the right page.
2. Hide Prices Across All Product Lists

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;
}
3. Hide Prices for Specific Products on a Collection Page

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:
    {% unless product.handle == 'custom-handmade-vase' or product.handle == 'limited-edition-print' %}
      <!-- Your price rendering code here -->
    {% endunless %}
    
    Add as many or product.handle == 'xxx' clauses as needed for each product you want to hide prices for.

Option 2: Target by Product Tag

  1. First, add a tag like hide-price to the products you want to modify (Shopify Admin → Products → edit the product → add the tag under "Organization")
  2. 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.28 14:02:43