Solved

Any way to set a character limit on the product title at the grid page in the dawn theme?

matdantas
Excursionist
14 0 3

Hello, is there's a way to set a character limit for the product title on the collection page? Some of my products have long titles and if they show the entire title on the collection page it looks like the picture, my store link is https://bellezinho.com.br/

matdantas_1-1714010958963.png

 

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
7678 1493 1496

This is an accepted solution.

Hi @matdantas 

You can do that from Online Store > Themes > Edit code > open card-product.liquid, find this line of code around line 155

{{ card_product.title | escape }}

Change it to this 

{{ card_product.title | truncate: 30 | escape }}

- Helpful? Like or Accept solution! or Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

View solution in original post

Replies 2 (2)

suyash1
Shopify Partner
9199 1146 1492

@matdantas - go to product template, find product title code and add truncate limit to it like the code below

 

{{ product.title  | truncate: 30}}
To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
Paranormal story video using AI

Dan-From-Ryviu
Shopify Partner
7678 1493 1496

This is an accepted solution.

Hi @matdantas 

You can do that from Online Store > Themes > Edit code > open card-product.liquid, find this line of code around line 155

{{ card_product.title | escape }}

Change it to this 

{{ card_product.title | truncate: 30 | escape }}

- Helpful? Like or Accept solution! or Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now