Liquid, JavaScript, themes, sales channels
I'm using Dawn theme and want line breaks in my product titles. I had "<br/>" in the title but it's not giving me the line break. Anyone else have any idea how to insert line breaks?
TIA for your help
Solved! Go to the solution
This is an accepted solution.
Hi @TheFabFriend21,
Please go to snippets > card-product.liquid file, find 'card_product.title' and remove code here:
Hope it helps!
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
@Ketan Thank you for your assistance. As you can see from the following page, when there are 2 lines for the product title, all other info lines up perfectly. The html code for line breaks doesn't work with this theme.
https://thefabfriend.com/collections/fragrance-roll-ons?page=11&sort_by=title-ascending
I don't see that you resolved this, as you still have <BR> on your page and in your cart. However, you can replace the <BR> with a hyphen. It isn't a perfect solutions but looks less like a coding error and more intentional. On the main page it will still have the double lines, but in the description and cart it will have a hyphen. Just make sure to put a space on either side of the dash that you want a page break.
In the spaces he said to delete the " | Escape " instead replace it with
" replace:' - ','<br>' " (leave off the "")
So the lines will look like this: {{ card_product.title | replace:' - ','<br>' }}
You will have to go into all your products and change the <br> you put in place to a hyphen but it works for me and I think it is a good work around. Thought I would share.
This is an accepted solution.
Hi @TheFabFriend21,
Please go to snippets > card-product.liquid file, find 'card_product.title' and remove code here:
Hope it helps!
This worked, thank you so much
User | RANK |
---|---|
37 | |
28 | |
14 | |
13 | |
9 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023