How to get parent and child name in taxonomy page
You can use get_ancestors() to get an array of IDs of the ancestors of a term in any taxonomies, and in your case, you would use the last 2 items like the example below, where I used: get_queried_object_id() to get the ID of the term on the term archive page that you are currently viewing … Read more