Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $termchildren = get_term_children( $taxID, $taxType );
- echo '<ul>';
- foreach ( $termchildren as $child ) {
- $term = get_term_by( 'id', $child, $taxType );
- $term_link = get_term_link( $term->name, $taxType );
- if( ! is_wp_error( $term_link ) )
- echo '<li><a href="' . $term_link . '">' . $term->name . '</a></li>';
- if( is_wp_error( $term_link ) )
- echo $term_link->get_error_message();echo " taxType: ".$taxType." taxID: ".$taxID;
- }
- echo '</ul>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement