Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@saltcod
Created May 3, 2012 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saltcod/2585777 to your computer and use it in GitHub Desktop.
Save saltcod/2585777 to your computer and use it in GitHub Desktop.
<?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>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment