How to Add Excerpt to Woocommerce on different pages limited by characters
-
Hi,
I want to add the excerpt element on different pages :
– archives page
– single product pageI found some help on this topic :
https://wordpress.org/support/topic/how-to-add-excerpt-to-woocommerce-archive-page/
so I inserted this code and it work perfectly :
//Excerpt Archives function display_desc_in_product_archives() { the_excerpt(); } add_action( 'ocean_after_archive_product_image', 'display_desc_in_product_archives' ); //Excerpt Single Product function display_desc_in_single_product() { the_excerpt(); } add_action( 'ocean_after_single_product_title', 'display_desc_in_single_product' );
With this code excerpt is too long on some products, limited by words is not a good solution : excerpt can be really different according to certain products with long words.
I just want to known if it possible to limit them by characters and with a different limits between this two pages it will be helpful (a longer limit on single product page, and a shorter on archives)!
Thanks.
- The topic ‘How to Add Excerpt to Woocommerce on different pages limited by characters’ is closed to new replies.