Shopify Pro Tip: Hide Shipping Text on Specific Product Pages (Like Gift Cards!)
Hey there, fellow store owners! Ever found yourself needing to tweak something super specific on your Shopify store, something that feels like it should be simple but isn't immediately obvious? That's a common feeling, and it's exactly why our amazing Shopify community is such a treasure trove of practical solutions.
Recently, a great question popped up that I wanted to highlight because it's a common scenario for many of you, especially if you sell a mix of physical and digital products. Our community member, jackdubl, was looking for a way to hide the 'shipping language' (you know, those little policy texts like shipping and return info) from just one product page: their gift card. They wanted it gone for the gift card, but to keep it visible on all their other physical products. It makes perfect sense, right? A digital gift card doesn't ship, so showing shipping policies there can be confusing or redundant.
Luckily, a brilliant community expert, Ploqo, stepped in with a fantastic, targeted solution using a bit of custom CSS. And the best part? It worked like a charm for jackdubl! Let's dive into how you can achieve this precise customization for your own store.
The Problem: Unwanted Shipping Text on Specific Products
Imagine you're selling beautiful physical goods, and then you add a digital gift card to your offerings. On your physical product pages, you want customers to clearly see your shipping and return policies right under the 'Add to Cart' button. It builds trust and sets expectations. But for that digital gift card? That text just looks out of place.
Here's a 'Before' shot, similar to what jackdubl was seeing on their gift card product page, with the shipping text:
The Solution: Targeted Custom CSS
Ploqo's solution is elegant because it uses a specific CSS selector to target only the product page you want to modify, leaving all your other product pages untouched. This is crucial for maintaining a consistent experience where it matters.
Here's how it looks 'After' the change, with the shipping text neatly hidden:
Step-by-Step Instructions to Hide Shipping Text
Before you start, remember this solution was tested on an Eclipse 5.3.2 theme. While the principle is generally applicable, specific class names (like .product__policies) might vary slightly depending on your theme. Always back up your theme before making code changes!
- Find Your Product ID: This is crucial. Navigate to the product page in your Shopify Admin (e.g., your gift card product). Look at the URL in your browser's address bar. It will look something like
https://your-store-name.myshopify.com/admin/products/15408185704669. The number at the end (15408185704669in this example) is your Product ID. Make a note of it. - Go to Your Theme Editor: From your Shopify admin, go to Online Store > Themes.
- Edit Your Current Theme: Find your current theme and click the … (three dots) button, then select Edit code. (Ploqo's image shows 'Customize' and then 'Edit theme', but 'Edit code' is where you'll find the CSS files). If your theme has a direct 'Edit theme' option that leads to a similar interface as shown by Ploqo, that's fine too.
- Access Custom CSS: On the left sidebar, click on Theme settings (the gear icon). Scroll down and click on Custom CSS. This is where you can add your own styling rules.
- Paste the Code: In the Custom CSS box, paste the following code. If there's already code there, paste this new snippet below it.
- Save Your Changes: Click the Save button in the top right corner.
product-block-buy-buttons:has(input[name="product-id"][value="YOUR_PRODUCT_ID_HERE"]) .product__policies { display: none; }
IMPORTANT: Replace YOUR_PRODUCT_ID_HERE with the actual Product ID you found in Step 1. For example, if your product ID was 15408185704669, your code would look like this:
product-block-buy-buttons:has(input[name="product-id"][value="15408185704669"]) .product__policies { display: none; }
How This Code Works
This little snippet of CSS is quite clever, thanks to the :has() pseudo-class (which is gaining wider browser support and is super useful!).
product-block-buy-buttons: This targets the main container that holds your 'Add to Cart' button and associated elements.:has(input[name="product-id"][value="YOUR_PRODUCT_ID_HERE"]): This is the magic part! It tells the browser, "Only apply these styles if thisproduct-block-buy-buttonselement contains an input field namedproduct-idAND that input field has avaluematching your specific Product ID.".product__policies { display: none; }: If the conditions above are met (meaning you're on your target product page), then it finds the element with the class.product__policies(which is where your shipping/return text usually lives) and hides it.
This ensures that only your chosen product page (your gift card, in jackdubl's case) will have that shipping text hidden, while all other products remain unchanged. It's a fantastic example of how a small, targeted CSS tweak can make a big difference in user experience and store clarity.
Remember, always test your changes thoroughly after implementing custom code. If you're using a different theme and this exact code doesn't work, don't fret! The core idea of targeting a product by its ID and hiding a specific element remains. You might just need to inspect your theme's HTML to find the correct class name for your shipping policies or the wrapper around your 'Add to Cart' button. A quick chat with a developer or another post in the Shopify community can usually help pinpoint those theme-specific details.
Kudos to Ploqo for sharing such an actionable and helpful solution with the community! It's these kinds of insights that truly make running a Shopify store a more customized and enjoyable experience.





