get term by id code example
Example 1: get current term id
<?php $current_term = get_queried_object()->term_id; ?>
Example 2: get term id
get_queried_object()->term_id;
<?php $current_term = get_queried_object()->term_id; ?>
get_queried_object()->term_id;