php
Donate
function get_tax_level($id, $tax){
$ancestors = get_ancestors($id, $tax);
return count($ancestors)+1;
}
$current_term_level = get_tax_level(get_queried_object()->term_id, get_queried_object()->taxonomy);
if ($current_term_level == 1) {
// show first drop-down
} else if ($current_term_level == 2) {
// show second drop-down
} else {
// show third drop-down
}