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
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024