| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 | <?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, $flatsome_opt;
 
 // Store loop count we're currently on
 if ( empty( $woocommerce_loop['loop'] ) )
 $woocommerce_loop['loop'] = 0;
 
 // Increase loop count
 $woocommerce_loop['loop']++;
 
 // set cat style
 if(isset($flatsome_opt['cat_style'])){
 if($flatsome_opt['cat_style'] && !isset($style)) $style = $flatsome_opt['cat_style'];
 }
 if(!isset($style)) $style = "text-badge";
 
 ?>
 
 <li class="product-category ux-box text-center ux-<?php echo $style; ?>">
 <?php do_action( 'woocommerce_before_subcategory', $category ); ?>
 <div class="inner">
 <a href="<?php echo get_term_link( $category->slug, 'product_cat' ); ?>">
 <div class="ux-box-image">
 <?php
 /**
 * woocommerce_before_subcategory_title hook
 *
 * @hooked woocommerce_subcategory_thumbnail - 10
 */
 do_action( 'woocommerce_before_subcategory_title', $category );
 ?>
 </div><!-- .ux-box-image -->
 <div class="ux-box-text  show-first">
 <h3 class="uppercase header-title">
 <?php     echo $category->name; ?>
 </h3>
 <p class="smallest-font uppercase count"><?php if ( $category->count > 0 ) echo apply_filters( 'woocommerce_subcategory_count_html', ' ' . $category->count . ' '.__('Products','woocommerce').'', $category); ?></p>
 <?php
 /**
 * woocommerce_after_subcategory_title hook
 */
 do_action( 'woocommerce_after_subcategory_title', $category );
 ?>
 
 </div><!-- .ux-box-text-overlay -->
 </a>
 </div>
 <?php do_action( 'woocommerce_after_subcategory', $category ); ?>
 </li>
 |