Add Short Descripton to Products in Shop Page (Woocommerce)

Displaying Product Descriptions within the WooCommerce Shop Page requires just a small custom function added to your Theme.

  1. Access the functions.php file via Appearance > Editor
  2. Or via FTP in your server in /wp-content/themes/
  3. Add the following line of code to the end of the file before the ?> Tag:
    add_action( 'woocommerce_after_shop_loop_item_title', 'lk_woocommerce_product_excerpt', 35, 2);   if (!function_exists('lk_woocommerce_product_excerpt'))    {        function lk_woocommerce_product_excerpt()         {        echo '<span class="excerpt">';        the_excerpt();        echo '</span>';        }   }
  4. Access Custom CSS area in Site Options panel
  5. Add the following code:
    ul.products li {width:22% !important;} ul.products span.excerpt p{padding-bottom:14px !important;}
  6. Adjust the if needed.

Then, when editing Products simply add in the short description into the “Product Short Description” field. If you would like to limit the amount of characters that are displayed in the Product Description, then add the code bellow instead:

add_action( 'woocommerce_after_shop_loop_item_title', 'lk_woocommerce_product_excerpt', 35, 2); if (!function_exists('lk_woocommerce_product_excerpt')) { function lk_woocommerce_product_excerpt() { $content_length = 5; global $post; $content = $post->post_excerpt; $wordarray = explode(' ', $content, $content_length + 1); if(count($wordarray) > $content_length) : array_pop($wordarray); array_push($wordarray, '...'); $content = implode(' ', $wordarray); $content = force_balance_tags($content); endif; echo "<span class='excerpt'><p>$content</p></span>"; } }

Adjust the number 5 in the $content_length with the amount of words you wish to display. (click screenshot for full-size view) Description_Shop [search_terms]woocommerce, shop, product, descriptions[/search_terms]