Support » Plugin: WooCommerce » display subcategory name of a product on product card

  • Resolved Sunday Lalbiaknia

    (@sundayamizo)


    I want to print the subcategory name of each product inside the product loop.

    I tried this:

    $category = get_the_category();
    echo $category[0]->cat_name;

    But, it does not work.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘display subcategory name of a product on product card’ is closed to new replies.