}
$output .= '>' . $parent->name . '</option>';
foreach($child_terms as $child){
- $grandchildren = get_terms($taxonomyName, array( 'child_of' => $child->term_id, 'orderby' => 'name', 'hide_empty' => false));
+ $grandchildren = get_terms($taxonomyName, array('parent'=> $child->term_id, 'child_of' => $child->term_id, 'orderby' => 'name', 'hide_empty' => false));
$output .= '<option value="' . $child->term_id . '"';
if ($_REQUEST[MICHSCI_CATEGORY_NAME] == $child->term_id) {
$output .= ' selected';