I am working on woocommerce and I am trying to display product’s category description on products page, not the single product page but on page where the selected category products are listed. This is the code i am using,

add_action( 'woocommerce_after_subcategory_title', 'custom_add_product_description', 12);
function custom_add_product_description ($category) {
    $cat_id        =    $category->term_id;
    $prod_term    =    get_term($cat_id,'product_cat');
    $description=    $prod_term->description;
    echo '<div>'.$description.'</div>';

This does display the description i need but on the page where the categories are listed, I need this to be on the products page where the selected category products are displayed.

I will really appreciate any help here

Read more here: Woocommerce product category description on products page


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: