Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Last active December 8, 2023 14:17
Show Gist options
  • Save SiR-DanieL/fed6d32ea3de0d00608b03483848bb7b to your computer and use it in GitHub Desktop.
Save SiR-DanieL/fed6d32ea3de0d00608b03483848bb7b to your computer and use it in GitHub Desktop.
How to Show the Product Short Description on the Shop Page
<?php
add_action( 'woocommerce_after_shop_loop_item', 'woo_show_excerpt_shop_page', 6 );
function woo_show_excerpt_shop_page() {
global $product;
echo '<p class="short-description">' . $product->post->post_excerpt . '</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment