Woocommerce - product page description

I need to add a small excerpt from the description of my "product" in the Woocommerce plugin. I have a page like this: http://exploreprague.cz/guides-buddies-2/ , and I need to have some description text under each person’s name ... is there any way to do this?

+4
source share
2 answers

This category page with products inside: woocommerce β†’ templates β†’ content-product.php

And you can find this function to show the name inside this page as follows:

<h3><?php the_title(); ?></h3> 

After this line, you can add your own lines:

 <br /><?php echo $product->get_sku(); ?> <br /><?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?> 

They will display the SKU and a brief description of the product.

Btw, this is just a quick hard code, you can try to add these functions to the hook on this page in your functions.php topic.

 add_action('woocommerce_after_shop_loop_item_title','woocommerce_template_single_excerpt', 5); 

As mentioned in this section of comments with hooks, the PRICE is already connected.

+16
source

Maybe this will help you

 <?php wc_get_template( 'single-product/short-description.php' ); ?> 

at this link https://docs.woothemes.com/wc-apidocs/function-woocommerce_template_single_excerpt.html

+1
source

All Articles