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
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024