Hide the "[CTA / block]" on the product page when the product is ["product-handle-1"] or ["product-handle-2"].
Want more control? See the expanded prompt ›
On the product page, hide the 'enterprise contact' CTA block when the product handle is 'starter-kit' or 'sample-pack'.
- Wraps the existing section in
{% unless %}based on handle, tag, or template. - Inverts cleanly — same prompt structure works to show only on specific products.
- Customer-tag aware for B2B / wholesale visibility gating.
- Theme-editor preview keeps working — Fudge writes Liquid the editor renders.
What you're trying to do
Not every section should show on every product. You probably have content — enterprise CTAs, ingredient lists, sizing charts, B2B blocks — that only makes sense for a subset of your catalog. The clean fix is a small Liquid conditional, not a duplicate template.
Things to watch out for
- Product handle vs product ID: Shopify keeps a product's handle when you rename it, unless you edit the handle yourself. Fudge uses the handle by default because it is readable.
- Tag-based vs handle-based: tags scale better as your catalog grows; ask Fudge to use tags instead.
- Multiple conditions: Fudge composes multi-condition logic cleanly (e.g. 'hide if handle is X or tag includes Y').
- Inverting: the same prompt structure works to show a block only on specific products.
How Fudge does it
Fudge duplicates your live theme into a draft, makes the targeted edit (Liquid logic, JS event, conditional rendering) your prompt requires, and tests it on the draft preview. Everything starts in draft — review the diff, verify the behavior, and publish when you're ready. Your live store stays untouched.
When conditional visibility logic is the right answer
To hide a block on specific Shopify products, wrap it in a Liquid unless check on the product handle (or tag) in the product template:
{% unless product.handle == 'starter-kit' or product.handle == 'sample-pack' %}
<!-- enterprise contact block -->
{% endunless %}
Some product pages need elements that other product pages don’t — enterprise CTAs on flagship products, gift-wrap toggles only on giftable SKUs, sustainability callouts only on certified products. Conditional Liquid logic shows or hides blocks based on product handles, tags, or types.
When this is worth doing
Use conditional logic when the difference is structural, not just stylistic. Hiding a “compare prices” block on a starter kit makes sense.
The pattern is highly reusable — same prompt structure works for “show only on X” and “hide on Y” cases.
What makes a great implementation
- Product-handle-based or tag-based — flexible matching.
- Inverting works the same way — “show only on X” and “hide on Y” follow the same logic.
- Doesn’t break the template — fails gracefully if a product handle is renamed or removed.
Common mistakes to avoid
The biggest mistake is hard-coding too many conditions. If 30 different blocks have conditional logic, the template becomes unreadable. Use customer-tag visibility gating for broader segmentation.
The second mistake is forgetting what’s left. When you hide a block on the starter kit, check that the rest of the buy box still makes sense on that product.
Pair this with customer tag visibility gating and theme code investigation, three technical tools for fine-grained control. Fudge writes this logic with its store editor; for more patterns, see how to add custom Liquid logic in Shopify.