get_term_children returns WP_Error for custom taxonomy
Since get_term_link() will return a WP_Error object if the term does not exist, you could try: $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 … Read more