0

I'm trying to add a short description to my shop archives. Right now the only things showing are the image, title, price, & add to cart button.

Using "Add shortened description under the product title in WooCommerce archive pages" answer code, I was able to get the short description to show.

This issue with this is for some reason it adds it above the product image, not between the title & price where I would like it. Any idea how to fix it?

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399

1 Answers1

0

Try the following:

function woocommerce_after_shop_loop_item_title_short_description() {
    global $product;
    if ( ! $product->get_short_description() ) return;
    ?>
    <div itemprop="description">
        <?php echo apply_filters( 'woocommerce_short_description', $product->get_short_description() ) ?>
    </div>
    <?php
}
add_action('woocommerce_after_shop_loop_item_title', 'woocommerce_after_shop_loop_item_title_short_description', 5);

The result: https://d.pr/free/i/kUiz7z

File_Submit
  • 395
  • 3
  • 13
  • 1
    Thanks a lot man! I'll try it later today and let you know the results. Thanks for the help – Joel Wise Feb 10 '20 at 17:22
  • this worked for showing it but it is still above the product picture. I am using the code snippets plugin to add the code – Joel Wise Mar 15 '20 at 18:19