-
-
Save purethemes/f25b21df5a1409399f64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying product category thumbnails within loops. | |
* | |
* Override this template by copying it to yourtheme/woocommerce/content-product_cat.php | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 1.6.4 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
global $woocommerce_loop; | |
// Store loop count we're currently on | |
if ( empty( $woocommerce_loop['loop'] ) ) | |
$woocommerce_loop['loop'] = 0; | |
// Store column count for displaying the grid | |
if ( empty( $woocommerce_loop['columns'] ) ) | |
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 ); | |
// Increase loop count | |
$woocommerce_loop['loop']++; | |
?> | |
<div class="four-shop columns isotope-item "> | |
<div class="shop-item"> | |
<figure > | |
<?php do_action( 'woocommerce_before_subcategory', $category ); ?> | |
<a href="<?php echo get_term_link( $category->slug, 'product_cat' ); ?>"> | |
<?php | |
/** | |
* woocommerce_before_subcategory_title hook | |
* | |
* @hooked woocommerce_subcategory_thumbnail - 10 | |
*/ | |
do_action( 'woocommerce_before_subcategory_title', $category ); | |
?> | |
<figcaption class="item-description"> | |
<a href="<?php echo get_term_link( $category->slug, 'product_cat' ); ?>"> | |
<h5> | |
<?php | |
echo $category->name; | |
if ( $category->count > 0 ) | |
echo apply_filters( 'woocommerce_subcategory_count_html', ' <mark class="count">(' . $category->count . ')</mark>', $category ); | |
?> | |
</h5> | |
</a> | |
<?php | |
/** | |
* woocommerce_after_subcategory_title hook | |
*/ | |
do_action( 'woocommerce_after_subcategory_title', $category ); | |
?> | |
<?php do_action( 'woocommerce_after_subcategory', $category ); ?> | |
</figcaption> | |
</a> | |
</figure> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment