WooCommerce: Show Product Description @ Shop Page

If you want to show the “short description” field on the products that are on your homepage or in the loop, here’s the PHP code to add to your functions.php.

Here’s my brand new Shop page, where each product displays its short description

PHP Snippet: Show Product Description @ Shop / Category / Loop Pages

 * @snippet       Show product short description @ WooCommerce Loop
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 6
 * @community     https://businessbloomer.com/club/

add_action( 'woocommerce_after_shop_loop_item_title', 'bbloomer_shop_product_short_description', 35, 2 );

function bbloomer_shop_product_short_description() {

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Truncate Short Description With “Read More” Toggle
    In this example we’ll see how to truncate the WooCommerce single product short description and place a “read more” link to reveal the hidden content… You can also apply this to the long description, a custom product tab, the product gallery, and whatever can be truncated. Enjoy!
  • WooCommerce: Display Global Short Description When Empty @ Single Product Page
    The WooCommerce product short description is that piece of content that appears on the right hand side of the featured image above the add to cart button. This is, of course, unless you forgot to enter the short description under Product > Edit Product > Short Description! In case you forgot to enter it or […]
  • WooCommerce: Add a Third Description @ Single Product Page
    There are times when the “long description” and the “short description” are not enough on the WooCommerce Single Product page. What if you need to add another HTML content section – say – at the very bottom of the page (and maybe, because of the longer page, add another add to cart button there as […]
  • WooCommerce: Display Long Description Instead Of Short One @ Single Product Page
    Especially when you migrate from a different ecommerce platform to WooCommerce, you may end up placing or importing content in the wrong place. A lot of confusion, for example, arises when a new WooCommerce store owner needs to understand the difference between the “Long” and the “Short” description. Well, the “Long description” is the one […]

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

39 thoughts on “WooCommerce: Show Product Description @ Shop Page

  1. This has worked great. Is it possible to truncate the text to show part of the short description with a “read more” toggle on the product shop loop? That would make this solution perfect!

  2. Worked great…how do we remove the link to the product from the text? is there a way to strip it of the href?

    1. Hi Andy, you can change hook or hook priority (based on your theme) and put it after the closing link tag

  3. Hi Rodolfo! How can i make this work for a certain category?

    1. Sure! I suggest you take a look at “conditional logic”: https://businessbloomer.com/woocommerce-conditional-logic-ultimate-php-guide/. Enjoy πŸ™‚

  4. Hi, i tried this code and many other codes but i m getting the same error. The product description is always coming above the product image in the shop page. Any solution?

    1. It really depends on your theme and custom CSS. Try changing “35” with a higher number, or check your custom CSS for “absolute” positioning or similar

  5. What about adding short description for woocommerce product blocks?

    Do they have some kind of hook like ‘woocommerce_after_shop_loop_item_title’ ?

    1. No, it’s a little more complex in that case

  6. Hi there,
    I am new to wordpress so excuse me it I am asking stupid questions:
    I inserted your code to my functions.php, but for some reason the description still doesn’t show up.

    What I am aiming to do is to add the description to the products displayed on the startpage, for example using the block “product by category”.

    Any clue what might be going wrong for me?
    Thanks in Advance!

    1. Not sure if this is block-friendly. Also, there might be a million reasons unfortunately. Keep trying, maybe with a different theme and no plugins but Woo, and let me know

  7. Hi. Great work.

    Is it possible to display the short description for all user roles except for just one specific? Thanks in advance.

    1. Hi Marcial, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  8. Is there a way to display the short description on mouse over shop image? Thank you.

    1. Hello Tania, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

    2. Thank you! I kind of thought that as I haven’t been able to find how to do it anywhere. Thank you for contributing so much to helping understanding woocommerce, very much appreciated.

  9. How can I show only the short description? This is showing long description if no short description is given for the product, when instead I want nothing to be shown if there is no short description.


    1. Hey Joe, thanks for your comment! “the_excerpt” should only echo the short description – is that the one you’re using?

  10. Hello Rodolfo,

    I tried adding exact the same code snippet from above but my problem is, that the function is there but it’s not being displayed properly. So there is the text but it’s not visible. First I have to change the style (e.g. the font-size to 13px) in style.css to make it visible. Why is that? Is it normal that I have to edit also the style.css to make a custom action added to a hook visible?

    Thanks in advance!

    1. Hey Martina, thanks for your comment! Yes, this probably depends on your custom theme – that’s why I added a class inside the HTML so that you can customize it as you wish πŸ™‚

      1. Try to replace the body of the function with:

            echo '<div class="product_excerpt">';
        	the_excerpt() ;
        	echo '</div>';

        and declare the class style as you wish.

  11. Hi Rodolfo,
    I was trying to do something similar as your article.
    What I would need to do is to add a short description for each product in the checkout page. I have done tons of research and this is the best I have come up with:

    $post_data->post_excerpt );
    return $other_data;

    The issue is that with this code I can only display the number 1, but I can’t see my product decription or attributes…
    Can you help me with that? I have tried everything I can…
    Thank you

    1. Paloma, thanks so much for your feedback! Yes, this is possible – but unfortunately this is custom work and I cannot provide this solution on the blog right now. If you would like to get a quote, feel free to go here. Thank you! R

  12. Thank you for the article. Can you please help me with a problem. How I can remove short description from the Archive page for the variable product only?

    1. Hi Sourav, you can simply wrap the function contents within this conditional check:

      function …. {
      if( $product->is_type( ‘simple’ ) ){
      // function content

  13. Thank you….

  14. Hi Redolfo,
    Thanks so much for this! I’ve been searching for this solution and yours is the only one that is understandable to someone NOT too confident with coding! I’ve added the code and can now see the short description here: https://journey2health.co.za/index.php/shop/
    I would like to make the description even shorter – perhaps only about 20 words. Any advice on how to do that would be GREATLY appreciated!

    1. Thank you Charine, much appreciated πŸ™‚ I see your website is broken so I can’t really help with the second question. However take a look at this article I wrote: Woocommerce: How to shorten product titles because that’s very similar to what you’re looking for! Hope this helps. R

  15. hello I’m Not able to get the content of the product .
    I am using “storefront ” Theme i.e woocomerce free theme.

    On home page I want to show Read more button with description.

  16. here is the question

    1. Hi Eliza, what do you exactly mean with “excerpt from the second description”? Is that the long description?

  17. hey ! may you help me please to display the excerpt from the second description of the woocommerce. here is the website . The excerpt should be about the 100.

    Code from content-product.php

    <a href="”>

    $tab ) : $i++; ?>

    <div id="content_tab_” >

    the function that return me the product description is
    . I can’t figure out how to substr it

  18. Hi Rodolfo,

    Thank you again for the tip.
    $post->post_content didn’t work for me but $post_data->post_content did.

    I really appreciate your expertise and time. It helped me to get it working and understand a bit more. How exciting!


  19. Hi Rodolfo,

    Thanks for getting back to me. I appreciate your time and expertise.
    I’m very new to web design as a hobby and fumbling through it.
    The code below gives me the product short description in the cart.
    What changes to this code will give me the long description in the cart?

    add_filter( ‘woocommerce_get_item_data’, ‘wc_checkout_description_so_27900033’, 10, 2 );

    function wc_checkout_description_so_27900033( $other_data, $cart_item )
    $post_data = get_post( $cart_item[‘product_id’] );
    $other_data[] = array( ‘name’ => ‘description’, ‘value’ => $post_data->post_excerpt );
    return $other_data;


    1. Try use $post->post_content instead of $post_data->post_excerpt πŸ™‚

Questions? Feedback? Customization? Leave your comment now!

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *