• Hi Folks,

    I’m having some trouble getting the category description of woocommerce categories to show correctly under the category image.

    I have used the following code and added it to my functions.php file in my child theme.

    //Display product category descriptions under category image/title on woocommerce shop page */

    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>’;
    }

    I got this code snippet from the following link:

    This snippet is working. However the category description will only show when the category is moused move which isn’t what I’m looking for.

    I’d like the description to show without having to moused on the category image.

    Is this possible?

    Looking forward to all your replys and thanks in advance folks.

  • The topic ‘Woocommerce category description not showing under category until moused over.’ is closed to new replies.