Need to Add one line under Out of stock products only

Topic summary

A Shopify store owner using the Dawn theme wants to display custom text exclusively on out-of-stock products, not on in-stock items.

Solution Provided:

  • Navigate to Shopify admin → Online Store → Themes → Actions → Edit code
  • Locate the CSS file (typically “base.css” in the Assets folder)
  • Add CSS code targeting .price.price--large.sold-out::after with custom content
  • The code uses ::after pseudo-element to append text below out-of-stock product prices

Follow-up Request:
The original poster accepted the CSS solution but then requested additional help adding a button (anchor tag) in the same location. The conversation appears ongoing as they seek guidance on implementing this button functionality alongside the custom text.

Summarized with AI on November 17. AI used: claude-sonnet-4-5-20250929.

I need to add some words on under out of stock products only not in in stock products in shopify dawn theme. Can you please help me on it. My shopify store link is this https://primolfw.myshopify.com/.

1 Like

Hi @Mohsin_Khan

You can do so by following the instructions below.

NOTE: Change the ‘Your text’ in the code to the text you want.

  • 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” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.price.price--large.price--sold-out:after {
    content: "Your text";
    padding: 1rem;
}

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

I love your solution, thank you for your reply, But I forgot to mention that I also need to add button there, can you show me how to do that?

Thank you for your response, But I forget to mention that I also need to add button(anchor tag) there, can you show me how to do that?