Not much time ago I was searching on Google some stuff for WooCommerce, and I found a request from a user asking how to show the product short description on the shop page.

I don’t think it could be useful for all shops, but it could for some.

Here’s how you can do it.

Add this code at the end of the file functions.php in wp-content/themes/your-child-theme-name/:

add_action( 'woocommerce_after_shop_loop_item', 'woo_show_excerpt_shop_page', 5 );
function woo_show_excerpt_shop_page() {
global $product;
echo $product->post->post_excerpt;

view raw
hosted with ❤ by GitHub

The snippet above will print the product short description between the product price and the Add to Cart button.

I’d suggest to use it only if you don’t have too many products in your store and if the short description is not long. Otherwise, your store page could became very long and also it won’t be easy to read the description.

19 replies
  1. Gary
    Gary says:

    Hi there. Thanks very much. This is almost exactly what I’m looking for. However, it is possible to include rendered audio shortcode. I want to have a play button under each product on the shop page.
    This piece of code just prints the actual shortcode , like ‘[audio mp3="https://www.mysite/wp-content/uploads/2017/01/xxx.mp3"][/audio]

    Thanks very much in advance. Also, I realise this was posted a while ago. It’s funny what you stumble across in searches : )

  2. Gary
    Gary says:

    Just a quick update. I found another piece of code which does what i needed. However, the play button is also a link to the single product page, so clicking play also loads the single page.
    I just need to fix that.
    This was the line of code:
    add_action( ‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_template_single_excerpt’, 5);


  3. Gary
    Gary says:

    Hi Nicola. Thanks so much for the swift response : )
    Our replies must have crossed in the aether.

    I’ve tried your edited code but it throws up an error.
    add_action( ‘woocommerce_after_shop_loop_item’, ‘woo_show_excerpt_shop_page’, 5 );
    function woo_show_excerpt_shop_page() {
    global $product;

    error here>> do_shortcode( echo $product->post->post_excerpt );

    Thanks again

  4. gary
    gary says:

    hello again. I’m sorry if this is slightly straying from this topic but it relates to the short description.
    On the single product page, under the short description, is a list of categories the product is associated with. Like this:

    Categories: female,10-12,t-shirt,jeans,shoes, green, red

    What I’m trying to do is limit the categories shown to a few specific ones (some of my products list maybe 10+ categories. I only really want two or three) and also add a title before the ones i pick.
    Something like:
    Gender: female
    Size: 10-12
    Color: green, red.

    I was seeing if the title idea was possible by displaying the category description before each category (like category desc ‘Gender: ‘ for category ‘Gender’ with sub categories ‘male’ and ‘female’ but I’m no programmer so have to search for code snippets via many a google search. However, the ones I’ve found, I can’t get to work. It’s very frustrating.

    I appreciate this is basically two thing; limit the categories displayed and add a title (maybe another way?) … and get them each on a new line : )

    Apologies for reaching out to you again and i’ll understand if you tell me to ‘get lost’ : )
    Any guidance very gratefully received.

    Kind regards


  5. emre
    emre says:

    Thanks for the code, it works for me as I wanted to have short description in my product listing at homepage.

    But my short description is long to display at homepage. Its better if I only display not more than 1 sentence, about 100 characters. How can I limit this?

  6. Adam
    Adam says:

    Hi Nicola!

    I was wondering if it would be possible to have the description directly under the title of the product (followed by the price)

    Reason for asking is for the many variable products I have — it isn’t necessary to have an “Add to Cart” button as you will have to choose your option before you do so anyway.

    It would preferably need to be in this order!

    Product Image
    Product Title
    Product Description
    Product Prices

    Here is an example I’ve thrown together!


    Thanks in advance!

  7. shaun
    shaun says:

    H Nicola,

    Excellent article, thanks. Is there a way to limit this to only 1 category rather than display for all categories?

    Apart from that it works just as I need it to.

  8. Marcial
    Marcial says:

    Hi. Thanks for your will to help others. Can i know a way to make the snippet work to show the short description to sol user roles except for just one? Thanks in advance.

  9. Kirsten
    Kirsten says:

    I added the short description to the category page using your code (thanks!).. any idea how to put this info inside of a coloured box?

  10. Radhika
    Radhika says:

    Hi Nicola. Thanks for the code. Is there any way I can change the color of the text? Would that code need to follow the previous code? Please advise.


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply