These code adds the full content of the product page and i cant seam to find a way to limit the amount of content to display. So when i add these code i get product page whit extremely long texts instead of a short description. I also cant use the short description for these since i have used that box for other information that is not relevant in the store page.
I have tried to add echo 'limit=50' but it don't work, i have also tried versus other codes but none seem to fix the problem
function extra_description() {
global $post;
echo '<div itemprop="description">';
echo apply_filters( 'the_content', $post->post_content );
echo '</div>';
}
add_action('woocommerce_after_shop_loop_item', 'extra_description', 1);
These code shows content to the products on the store page (Under the image and title for products) but these code displays all the content on the site. I would like to limit it to only 50-100 words.