G
G
Germagen6562020-10-03 16:34:42
WooCommerce
Germagen656, 2020-10-03 16:34:42

Displaying a short product description in a WooCommerce catalog?

Brought the product description to the catalog by editing the file (functions.php)

Easy Storefront theme

Added this

function add_short_description() {
echo the_excerpt();
}

add_action( 'woocommerce_after_shop_loop_item_title', 'add_short_description', 9 );

It turned out like this.

5f787d33dd326382780921.png

How to make the description in the catalog displayed with the preservation of the strings as in the description in the product card?

5f787da1725c0925249022.png

Thanks for the answer. I will be glad for any help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Germagen656, 2020-10-03
@Germagen656

Understood!!! If the description is in the short description column, then the line break is preserved. Central location.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question