Hide per unit pricing on some products

Could someone help with hiding per unit pricing CSS? Generally I want to show per unit price but there are some products that are sold as individual units so it’s not needed.

All help greatly appreciated!!

Hey @hannahoreilly1 ,

If you only want to hide the unit price for specific products, I’d recommend using Liquid rather than CSS alone.

CSS can hide the element visually, but it can’t determine which products should or shouldn’t display unit pricing unless there’s already a unique class or attribute to target.

A more maintainable approach is to:

  • Add a product tag or metafield (for example, hide-unit-price).
  • Wrap the unit price output in a Liquid condition so it’s only rendered when appropriate.

That way, unit pricing remains visible for products where it’s useful while being hidden only for the individual unit products you’ve identified.

If you let us know which theme you’re using (for example, Dawn or another OS 2.0 theme), someone can point you to the exact Liquid file and code to update.

If you found my reply helpful, feel free to mark it as the accepted solution so it can help other merchants following this discussion.

Thank You !

Thanks so much @Steve_TopNewYork

I just deleted the per unit pricing from the product itself so it doesn’t show - I totally overcomplicated this. Just noting in case someone finds the thread!

Hi @hannahoreilly1

Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.

Best regards,
Devcoder :laptop:

Glad you got it sorted, and your fix is actually the correct one. The unit price only renders when a product’s unit quantity and measurement fields are filled in, so clearing those is the proper native fix, no CSS needed.

One thing worth knowing for next time: if you ever need this across a lot of products, you can clear those fields in bulk instead of one at a time. Products list, tick the products, Bulk edit, add the unit price columns, then clear them in one pass.

It’s also the more robust route than a CSS rule, since hiding with CSS leaves the unit price in the page source where screen readers and scrapers still pick it up. And you don’t need to hand over a store password to anyone to solve this one.