How to display child categories of all parent category within a singe loop?

1 views
0
$args = array(
    'post_type' => 'listing',
    'order' => 'ASC',
    'hide_empty' => false,
    'parent' => 0,
);

$listCatTerms = get_terms( 'listing-category',$args);
    if ( ! empty( $listCatTerms ) && ! is_wp_error( $listCatTerms ) ){
        foreach ( $listCatTerms as $term ) {
            echo '<li class="lp-wrap-cats" data-catid="'.$term->term_id.'">'.$catIcon.'<span class="lp-s-cat">'.$term->name.'</span></li>';
            $defaultCats .='<li class="lp-wrap-cats" data-catid="'.$term->term_id.'">'.$catIcon.'<span class="lp-s-cat">'.$term->name.'</span></li>';
        }
    }