Easily Show Descriptions in your Woo Commerce Shop Items

I don’t know why, but for some reason this is not a default toggle setting within Woo Commerce and your store items.  It should be very easy to have a short description excerpt show up underneath your product title and price, but it’s not.

I searched and searched for a way to do it, tested out about 3 or 4 different ways, and stumbled upon this bit of code that not only shows the description, but nicely places it underneath your title and price.

So this first bit goes into your – functions.php scroll to bottom, before the “?>” and paste.

add_action( ‘woocommerce_after_shop_loop_item_title’, ‘output_product_excerpt’, 10 );

add_action( ‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_template_single_excerpt’, 5);

function output_product_excerpt() {
global $post;
echo $post->post_excerpt;

You’ll notice the number 10 in the code can be changed for how many max-words you want to show up in the description.

And then the next portion goes in your CSS stylesheet to give it a nice centered look:

#top.woocommerce-page .template-shop ul.products li a {
text-align: center;

#top .template-shop .price span {
text-align: center;
display: block;

voila! That’s it. Now you can easily Show Descriptions in your Woo Commerce Shop Items

More about Woo Commerce


Pin It on Pinterest

Did you like this article?

Share this post with your friends!