Display Product Category Description in Product page on woocommerce


You can use this code to display the product category description:

<?php global $post, $product;
$categ = $product->get_categories();
$term = get_term_by ( 'name' , strip_tags($categ), 'product_cat' );
echo $term->description; ?>

About these ads

Tags: , ,

4 responses to “Display Product Category Description in Product page on woocommerce”

  1. farid says :

    which page please?

  2. samandella says :

    I’d like to know where to paste this, too! Still no answer? Anyone?

  3. NV020 says :

    Paste this code in page: archive-product_template_1.php (woocommerce/archive-product_template_1.php)

    After this div:

    <— paste it here, good luck!

  4. mimi says :

    thanks for this

    I put also my code wich display imag category in a product

    in a product-image.php for exemple you can put this code

    get_categories();
    $cat= get_term_by ( ‘name’ , strip_tags($categ), ‘product_cat’ );

    $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, ‘thumbnail_id’, true );
    $image6 = wp_get_attachment_url( $thumbnail_id );

    if($image6 && $image6 !=”){
    ?> <img class="cat-banner" src="” /> thumbnail_id; ?>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 701 other followers

%d bloggers like this: