添加到function.php
/* Adding excerpt to shop page */ add_action( 'woocommerce_after_shop_loop_item', 'diggs_custom_shop_item', 5); function diggs_custom_shop_item() { global $post; /* product excerpt */ if ( $post->post_excerpt ) { echo '<div class="diggs-shop-excerpt">' . apply_filters( 'woocommerce_short_description', wp_trim_words($post->post_excerpt,6,' ') ) . '</div>'; } }