I'm using get_the_term_list
on an archive page which currently outputs all categories that a post is in with links.
My question: Is it possible to only display the last child category, not any parents or grandparents?
Thios is what I have that outputs all:
<?php if( get_the_terms(get_the_ID(),'event-category') ){
echo get_the_term_list( get_the_ID(),'event-category', '', ', ', '' );
} ?>