Reputation: 11
In the product page, each product has an image, and below two sub caption : the title and a link to the product categories. I'd like to replace this product categories field with the short description of the product.
I had a look at every php file in the woocomerce folder, but can't find the line to edit.
thanks for you help.
Upvotes: 0
Views: 533
Reputation: 6080
Generally in WooCommerce, It is located in wp-content > plugins > woocommerce > templates > single-product > meta.php
Line 30
But if you are using themes for woocommerce, then it might be located at some other place but for that you need to debug by your self to find it.
NOTE : DO NOT change the default WooCommerce file directly. There is nice tutorial about it.
EDITED
Replace it with below code:
<?php
global $post;
if ( ! $post->post_excerpt ) {
return;
}
?>
<div itemprop="description">
<?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>
</div>
Upvotes: 0