Home > Enterprise >  How to add category name for each product in shop page woocommerce
How to add category name for each product in shop page woocommerce

Time:07-30

enter image description here

how to add product category in product sheet of woocommerce archive page. Right now it shows "Title" "Price" and "Add to Cart Button".

CodePudding user response:

Add these codes to your theme functions.php file. It will show category name above the title.

add_action( 'woocommerce_shop_loop_item_title', function ( ){
    global $product;
    
    echo wc_get_product_category_list($product->get_id());
}, 9 );
  • Related