Skip to content
Create a gist now

Instantly share code, notes, and snippets.

$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>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.