Truncating/Shorterning Product titles?

Tourist
20 0 2

Hi everyone! 

I was wondering if anyone knew how to limit the amount of characters/words can be in a product title, e.g. so that "caramel swirl ice cream, with added caramel curls" became "caramel swirl ice cream..." when views on the collection page, and then when viewed on the actual product page for the full title to show.

I've seen this posted elsewhere on this forum: 

For your product title tag, use the truncate feature like this

{{ product.title | truncate: 30 }}

 

But I'm not sure if this is still the way to do it? as this was posted many years ago!

Thanks in advance for your time. Much appreciated.

0 Likes
Highlighted
Tourist
20 0 2

Bump

0 Likes