I got it! Seems a little confused at first, but the logic is here:
<?php $term = get_queried_object(); ?>
<?php echo $term->name; ?>
<?php
$children = get_terms( $term->taxonomy, array(
'parent' => $term->term_id,
'hide_empty' => false
) );
if($children) {
foreach ( $children as $child ) {
?>
<?php echo '<li>' . $child->name . '</li>'; ?>
<?php
$loop = new WP_Query( array(
'orderby' => 'date',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'mycustomtaxonomy',
'field' => 'id',
'terms' => $child->term_taxonomy_id
)
)
));
while ($loop->have_posts()) : $loop->the_post();
?>
<?php echo '<div>' . get_the_title() . '</div>'; ?>
<?php
endwhile;
wp_reset_postdata();
?>
<?php }
} ?>
Hope it help others!