This is a direction. Not tested but you have an idea.
<?php
// get current term
$term = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') );
// get parent term
$parent = get_term($term->parent, get_query_var('taxonomy') );
// get children
$children = get_term_children($term->term_id, get_query_var('taxonomy'));
$taxonomy = 'business-types';
if ( empty($parent->term_id) ) {
echo '<a href="' . esc_url( get_term_link( $term ) ) . '">' . $term->name . '</a><br />';
$args = array(
'child_of' => $term->term_id,
'taxonomy' => $term->taxonomy,
'hide_empty' => 1,
'hierarchical' => true,
'depth' => 1
);
echo '<ul>';
wp_list_categories($args);
echo '</ul>';
// Subcategories
} elseif ($parent->term_id && sizeof($children) == 0) {
$subterm = get_queried_object();
// $parents = $subterm->parent; // May be will be useful in the future
// $term_id = $subterm->term_id; //May be will be useful in the future
echo '<a href="' . esc_url( get_term_link( $term ) ) . '">' . $subterm->name . '</a><br />';
$args = array (
'taxonomy' => $taxonomy,
'pad_counts'=> 0,
'title_li' => '',
'child_of' => $subterm->parent,
);
echo '<ul>';
wp_list_categories($args);
echo '</ul>';
}
For Parent Term listing you have to go here.