lmartins
11/18/2014 - 7:24 PM

Show categories associated to each product in archives

Show categories associated to each product in archives

/**
 * Mostra as categorias associadas ao tema
 */
add_action( 'woocommerce_after_shop_loop_item_title', 'mw_archive_add_theme_category', 5 );
function mw_archive_add_theme_category()
{

  global $product;
  $out = '<div class="product-categories">';
  $out .= strip_tags( $product->get_categories() );
  $out .= '</div>';

  echo $out;
}