Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = array(
- 'number' => $number,
- 'orderby' => $orderby,
- 'order' => $order,
- 'hide_empty' => $hide_empty,
- 'include' => $ids
- );
- $product_categories = get_terms( 'product_cat', $args );
- foreach( $product_categories as $cat ) { echo $cat->name; }
- $args = array(
- 'number' => $number,
- 'orderby' => $orderby,
- 'order' => $order,
- 'hide_empty' => $hide_empty,
- 'include' => $ids
- );
- $product_categories = get_terms( 'product_cat', $args );
- foreach( $product_categories as $cat ) {
- echo $cat->name.' ('.$cat->count.')';
- }
- <ul class="Category-list">
- <?php
- $wcatTerms = get_terms('product_cat', array('hide_empty' => 0, 'parent' =>0));
- $count = $category->category_count;
- foreach($wcatTerms as $wcatTerm) : ?>
- <?php
- $thumb_id = get_woocommerce_term_meta( $wcatTerm->term_id, 'thumbnail_id', true );
- $term_img = wp_get_attachment_url( $thumb_id );
- ?>
- <li><a href="<?php echo get_term_link( $wcatTerm->slug, $wcatTerm->taxonomy ); ?>"><?php echo $wcatTerm->name; ?>(<?php echo $wcatTerm->count;?>)</a></li>
- <?php endforeach; ?>
- </ul>
- </div>
Add Comment
Please, Sign In to add comment