How to hide the sale/ out of stock badge on product in Dawn theme?
Topic summary
A user sought help removing sale/out of stock badges from products in their Dawn theme.
Solutions provided:
-
CSS method (accepted solution): Add custom CSS to hide the badge by targeting
.card__badge.bottom.leftwithdisplay: none;in the theme’s CSS file (base.css, style.css, or theme.css) -
Alternative approaches: Other contributors suggested adding similar CSS code either in theme.liquid before the
</body>tag or below the<head>tag
Resolution: The user confirmed the CSS solution worked successfully.
Implementation steps:
- Navigate to Online Store → Themes → Edit code
- Locate the appropriate CSS or theme.liquid file
- Insert the display:none CSS rule targeting the badge class
- Save changes
Hi @zrokth
Check this one.
From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
Find the theme that you want to edit and click on “Actions” and then “Edit code”.
In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.card__badge.bottom.left {
display: none;
}
And Save.
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
Hello @zrokth
You can add code by following these steps
-
Go to Online Store → Theme → Edit code.
-
Open your theme.liquid file
-
Paste the below code before on theme.liquid
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Hey @zrokth ,
Go to your theme’s “Edit Code” Option, then in the search bar type “theme.liquid”
Below the tag “” tag paste the following. Screenshot attached for reference.
Screenshot is for reference only, the correct code to paste is the one shown above.
this worked, thank you
