Advertisement
Guest User

categoryimage

a guest
Jun 11th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. <div>
  2. <?php
  3.     $taxonomy_name = 'product_categories';
  4.     $termchildren = get_term_children( $term_id, $taxonomy_name );
  5.  
  6.     echo '<ul>';
  7.     foreach ( $termchildren as $child ) {
  8.         $term = get_term_by( 'id', $child, $taxonomy_name );
  9.         echo '<li><a href="'.get_term_link($term->slug, $taxonomy_name).'">'.$term->name.'</a><img src="'.z_taxonomy_image_url($child->term_id).'" alt=""/></li>';
  10.     }
  11.     echo '</ul>';
  12. ?>
  13. </div>
  14.  
  15. <?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement