I have a 'location' taxonomy, and on the archive pages I wish to display the posts location terms. Each post has one child term, so it is ticked 'New York' under the parent US.
On the front end I wish to display - New York, US
So the child term which is ticked, and then the parent.
At the moment I just have
<?php echo get_the_term_list( $post->ID, 'location'); ?>
Which just shows the ticked term, however I wish it to pull in the parent term too.