WooCommerce +Emmet Pro Add Category Descriptions

Free and Premium WordPress Plugins & Themes Forums WordPress Themes Emmet WooCommerce +Emmet Pro Add Category Descriptions

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #630937
    Mike Hammock

    Hi there,

    Why does the Emmet Pro theme fail to show the category desriptions on this page? https://lineofduty.com/shop/categories?

    Woocommerce says that it depends on the theme – the only reason I am asking is because this is the Emmet Pro Theme.

    Is there a “fix” or modification for this issue?

    Best Regards,
    Mike H

    J. Davis

    Hi Mike,

    Thank you for reaching us out. You can output category description page where are listed categories by adding code below to functions.php file of your child theme.

    add_action( 'woocommerce_archive_description', 'woocommerce_category_image', 2 );
    function woocommerce_category_image() {
        if ( is_product_category() ){
    	    global $wp_query;
    	    $cat = $wp_query->get_queried_object();
    	    $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );
    	    $image = wp_get_attachment_url( $thumbnail_id );
    	    if ( $image ) {
    		    echo '<img src="' . $image . '" alt="' . $cat->name . '" />';

    Best regards,

    Mike Hammock

    Im going to try that 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.