Right now I have a front end form that lists 4 separate taxonomies in checkbox inputs that a user selects. I can list all of the terms one after the other but I can't figure out out to list them with proper hierarchy like so:
-parent
-child
-child
-child
-parent
-child
-child
etc.
Right now my code to output to the form is
$closed_schools = get_terms('closed_schools', 'orderby=id&order=ASC&hide_empty=0&get=all');
$counter = 0;
foreach ($closed_schools as $close) {
$counter++;
$option = '<fieldset id="'.$close->slug.'"><label for="'.$close->slug.'">'.$close->name.'</label>';
$option .= '<input type="checkbox" name="terms[]" id="'.$close->slug.'" value="'.$close->slug.'">';
$option .= '</fieldset>';
echo $option;
}