How to adjust character limit on the product title

The titles we use on ETSY and Amazon are too long, and since I pull my products from these marketplaces, it looks very awful on my shopify page. How is there a way to limit them? (a few threads have been opened and I read them, but they were not effective on the theme I use)

The theme I use;
https://themes.shopify.com/themes/enterprise/styles/home/preview

Thanks.

Hi @egemen_o ,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save


Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Hi @PageFly-Oliver ,

Thanks for the solution! It’s worked on product card page!

Also i edited the code for home page products cards ;

.card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

But another problems appeared after this :disappointed_face: @PageFly-Oliver
It’s cropping promotion’s picture as ;
https://prnt.sc/Z6kwam-50XHq

And its have to be like ;
https://prnt.sc/4B9ldFul07B7

Can you give me your link?

I think it was a bug. Not its works perfectly!