September 22, 2021
Check if the current term is a parent and allow for different formatting based on conditions.
Term query
$term = get_queried_object();
$is_parent = $term->parent == 0 ? true : false;
Condition
if($is_parent) {
// true
} else {
// false
}