public
Created

  • Download Gist
gistfile1.aw
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php
$termID = 10;
$taxonomyName = "tool";
$termchildren = get_term_children( $termID, $taxonomyName );
$termThumbs = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy'=> 'tool'));
$termThumb = wp_get_attachment_image( $termThumb->image_id, 'thumb' ) ;
 
echo '<ul>';
foreach ($termchildren as $child) {
$term = get_term_by( 'id', $child, $taxonomyName );
echo '<li>';
echo $termThumb;
 
echo '<a href="' . get_term_link( $term->name, $taxonomyName ) . '">' . $term->name . '</a>';
echo '</li>';
 
}
echo '</ul>';
?>
 

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.