woocommerce_template_loop_category_title

Show the subcategory title in the product loop.

Description

woocommerce_template_loop_category_title( $category ); 

Parameters (1)

0. $category
The category.

Usage

  1. if ( !function_exists( 'woocommerce_template_loop_category_title' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php'; 
  3.  
  4. // The category. 
  5. $category = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = woocommerce_template_loop_category_title($category); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-template-functions.php  
  1. function woocommerce_template_loop_category_title( $category ) { 
  2. ?> 
  3. <h2 class="woocommerce-loop-category__title"> 
  4. <?php 
  5. echo $category->name; 
  6.  
  7. if ( $category->count > 0 ) 
  8. echo apply_filters( 'woocommerce_subcategory_count_html', ' <mark class="count">(' . $category->count . ')</mark>', $category ); 
  9. ?> 
  10. </h2> 
  11. <?php