Shopify themes, liquid, logos, and UX
I cannot add a line break using <br> in the subheading for Zest theme. How can I do this?
Hi @spasister ,
In Shopify themes, including the Zest theme, certain text fields like subheadings may not support HTML tags like <br> directly. However, you can try adding a line break using CSS or by modifying the theme's code. Here's how:
Method 1: Using CSS
.subheading-class::after {
content: "\A"; /* This adds a line break */
white-space: pre; /* This makes sure the line break is rendered */
}
Replace .real-subheading-class with the actual class name of your subheading element.
Method 2: Modify Theme Code
Go to Online Store > Themes > Actions > Edit code.
locate the file of subheading and try this code.
<h2>{{ 'Your Subheading Text' | replace: ' ', '<br>' }}</h2>
I hope this helps! If not, please provide url of website.
If it does, please like it and mark it as a solution!
If you need further assistance, feel free to reach out!
Regards,
Sweans
Hi Sweans, I'm not able to find "Subheading". Here is my URL (in preview mode): https://q8yg7oy2djj1wm9t-27013598.shopifypreview.com
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025