Add short product description on product archives in WooCommerce

add_action( 'woocommerce_after_shop_loop_item', 'wpcb_show_product_short_description_on_loop' );
if ( ! function_exists( 'wpcb_show_product_short_description_on_loop' ) ) {
	/**
	 * wpcb_show_product_short_description_on_loop.
	 */
	function wpcb_show_product_short_description_on_loop() {
		$product = wc_get_product();
		echo '<p>' . $product->get_short_description() . '</p>';
		// or if you want new lines to be converted: echo wpautop( $product->get_short_description() );
	}
}

You can add this snippet to your (child) theme's functions.php file.

No comments yet.

Leave a Reply