My product has too many titles displayed on the homepage. Can I change the code and set the title to 19 letters?
https://www.whicestyle.com/
Please provide website url and if your store is password protected then also provide password
Please add the following code at the bottom of your assets/theme.scss.liquid file.
h3.product-title>a{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
Hope this works. This is for the collection page.
Thanks!
Didn’t play any role,
Website is on top
Find the theme code: product-grid-item.liquid ,Add in (
{{ product.title) | truncate:19 This code 19 number represents the letter length of the name。
I did not find these codes
Yes, I tried, I didn’t find that directory
##-请在此行上方输入您的回复-##
I can see your second screenshot. You have drawn a rectangle but can’t see code there. The code should work.
Thanks!
No, no, I just added the code, which caused the product name in Figure 1 to overlap, so I deleted it.
@dmwwebartisan No, no, I just added the code, which caused the product name in Figure 1 to overlap, so I deleted it.
Can you put that again?
I will check. You want the product title in one line right?
Like I have shown in my previous screenshot ?
@dmwwebartisan yes,But I added the code, and the product titles on the homepage overlapped
@dmwwebartisan This is what it looks like after adding the code
@dmwwebartisan @I have deleted the code now, if I add it, it will be the same as the picture I sent yo
@dmwwebartisan I have added the code now, you can check again






