Limit the number of lines of the title in “WC Product Widget”
-
Hi,
When the product title is too long, it looks quite odd in “WC Product Widget.”
Is there any way, that we can limit the number of lines of the product title to 3, in WC Product Widget (Similar to limiting the number of lines of product title in product archives).
Regards,
Hello,
Navigate to Theme Settings > Product Archive > Product Styles > Product title lines limit. Set the number of product title lines if it does not fit on one line.
https://prnt.sc/Qr19GCosCRPQ
If you want to apply the line limit on this widget, share the page URL so i will check and give you a possible solution.
Best Regards.
Hi,
I want to limit the number of lines of the product titles in “WC Product Widget” .
Please find the following test site login details.
Regards
Hello,
Please add the below Custom CSS code to Theme Settings > Custom CSS > Global custom CSS to control the title line limit.
.product_list_widget>li .wd-entities-title {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2; /* Change this value to control the number of lines */
}
Best Regards.
Hi,
Above CSS code doesn’t work for me.
I want to limit the number of lines of the product titles in “WC Product Widget” .
Regards,
To fix this issue, try to first remove previous custom code and add the following code snippet to the Global Custom CSS area in Theme Settings.
.widget_products .wd-entities-title {
overflow: hidden;
max-height: calc(var(--title-line-count, 2) * var(--title-line-height, 1.4em));
line-height: var(--title-line-height, 1.4em);
}
Kind Regards