We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How can I insert line breaks in Dawn theme product titles?

Solved

How can I insert line breaks in Dawn theme product titles?

TheFabFriend21
Shopify Partner
12 0 2

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

Accepted Solution (1)

LitExtension
Shopify Partner
4963 1010 1192

This is an accepted solution.

Hi @TheFabFriend21,

Please go to snippets > card-product.liquid file, find 'card_product.title' and remove code here:

Screenshot.png

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com

View solution in original post

Replies 10 (10)

KetanKumar
Shopify Partner
37635 3670 12168

@TheFabFriend21 

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.

If helpful then please Like and Accept Solution. Partnership of your ️ Coffee Tips and my code can bring miracles.
Want to modify or custom changes on store Hire Me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
TheFabFriend21
Shopify Partner
12 0 2

@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

Fallen_Angel
Visitor
1 0 0

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.

Rburg
Tourist
4 0 1

I followed these steps but my color variants do not show up, do you have a solution?

LitExtension
Shopify Partner
4963 1010 1192

This is an accepted solution.

Hi @TheFabFriend21,

Please go to snippets > card-product.liquid file, find 'card_product.title' and remove code here:

Screenshot.png

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com
TheFabFriend21
Shopify Partner
12 0 2

This worked, thank you so much

Daxtel
Tourist
7 0 0

This worked thank you. 

shimlee
New Member
10 0 0

Hello, I have the dawn theme and cannot find card_product.title in the liquid code. What would be the next best thing to look for or change?

Website: Square Wood Photo Print (1:1 Ratio) – Shimlee (shopifypreview.com)

Live View Password: Khome200

Verterra
Explorer
75 1 11

Hi! I tried this solution and it worked. However, now the <br/> is showing up in my product listing in the title. Are you able to suggest any workaround for this? 

Verterra_0-1719984328210.png

 

My store URL is: https://verterra.sg/password, password is VerterraTest123

 

WilliamLin
Visitor
2 0 0

Hi Verterra,

 

Did you find a workable solution?

I'm having the same problem😭

If you have found one, would you please share with me? Much appreciated!!!!!!!