Need Help Adding a Line Break to Thank You Page Text

I’m trying to customize the text on my store’s thank-you page. By default, it says, “You’ll receive a confirmation email with your order number shortly.” I edited my theme’s default content to change it to:

“You’ll receive a confirmation email with your order number shortly — Please note that we’re working hard to ensure your gifts arrive in time for the holidays!”

However, I want to replace the “—” with a line break before “Please” instead. I tried using
but it didn’t work. Does anyone know how I can fix this?

@technase store url? or simply press enter

Hi @technase ,

Go to Settings > Checkout > Additional Scripts.

Use JavaScript to dynamically modify the thank-you page text:

document.querySelector('.thank-you-page-message-class').innerHTML = `
  You’ll receive a confirmation email with your order number shortly

  Please note that we’re working hard to ensure your gifts arrive in time for the holidays!
`;

Replace .thank-you-page-message-class with the appropriate class or selector for the thank-you page text.

Using Shopify Translation Fields:

Shopify often allows you to customize system messages through Settings > Languages:

  • Navigate to the Checkout & System section.
  • Search for the thank-you page message and edit it directly. Some fields might accept raw HTML, but others may strip tags.

4. Fallback Solution

If none of the above options work because the editor strips out
:

  • Use a workaround like double spacing to mimic a line break:
You’ll receive a confirmation email with your order number shortly.

Please note that we’re working hard to ensure your gifts arrive in time for the holidays!

This might depend on how the theme processes text formatting.

Here’s how you can implement a line break in your thank-you page text:

Steps to Edit the Thank-You Page
Navigate to the code editor:

In your Shopify admin, go to Online Store > Themes.
Find your current theme and click Edit code.
Find the appropriate file:

Look for the checkout.liquid file if your theme has checkout customizations enabled (available on Shopify Plus). Otherwise, search for files related to the thank-you page.
If your theme doesn’t provide direct access to the thank-you page, you might need to use translation fields instead.
Modify the content:

Locate the text in the file that you want to modify.
Replace the — with a
tag. For example:


You’ll receive a confirmation email with your order number shortly.
Please note that we’re working hard to ensure your gifts arrive in time for the holidays!

Save your changes.

Alternative Using Shopify’s Language Editor
If the thank-you page text is stored in the Theme Content section:

Go to Online Store > Themes.
Click Actions > Edit languages.
Search for the thank-you page text in the language editor.
Use
where you want the line break:

You’ll receive a confirmation email with your order number shortly.
Please note that we’re working hard to ensure your gifts arrive in time for the holidays!

Save your changes.

Shopify’s sanitization sometimes strips out HTML tags like
. If this happens, the first method (editing Liquid files) is more reliable.
Always test your changes to ensure they display correctly on the thank-you page.
Let me know if you face any challenges!