Hi!
So, I’d like to show my category descriptions in the category widget, but I for the life of me can’t seem to figure out how. I’ve found a couple of threads detailing how to do it for the category page, i.e. adding this to functions.php
add_action( 'woocommerce_after_subcategory_title', 'my_add_cat_description', 12);
function my_add_cat_description ($category) {
$cat_id=$category->term_id;
$prod_term=get_term($cat_id,'product_cat');
$description=$prod_term->description;
echo '<div class="shop_cat_desc">'.$description.'</div>';
}
But that doesn’t seem to do the trick for the widget.
Any help would be greatly appreciated!
Cheers 🙂
https://wordpress.org/plugins/woocommerce/