I have a loop term of my custom taxonomy here:
<?php
$terms = get_terms( array(
'taxonomy' => 'customtax',
'hide_empty' => false
) );
$i = 0;
foreach( $terms as $term ) {
echo "
html block to display $term;
";
$i++;
};
?>
My goal is to group all terms of parent taxonomy into the array and display one by one:
CAT PARENT NAME:
- children
- children
- children etc...
CAT PARENT NAME 2:
- children
- children
- children etc...
I hope someone understands that.