limit product short description in related products

[ad_1]

i need to limit product short description in related products

currently i am using this script

add_action( ‘woocommerce_after_shop_loop_item_title’, ‘jjump_shop_product_short_description’, 35, 2 );

function jjump_shop_product_short_description() {
the_excerpt();
}

css script

.archive .product p, .archive .product ul, .woocommerce ul.products li.product .woocommerce-loop-product__title, .homearch p {
overflow: hidden;
margin-bottom: 8px;
white-space: nowrap;
height: 30px;
text-overflow: ellipsis;
max-width: 500px;
}

above function will work for related product short description p tag but it will not work for li tag

  • This topic was modified 14 hours, 2 minutes ago by prabhu.
  • This topic was modified 13 hours, 53 minutes ago by prabhu.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer