Get current term on taxonomy archive pages // the current taxonomy term. $term = get_queried_object()->slug;