Hi @speakincode, thank you for your help!
I’ve been bashing my head at it for hours yesterday. Your code throws a fatal error:
Fatal error: Uncaught Error: Cannot use object of type WP_Term as array in ...
What eventually seemed to work was this. Don’t know if it’s very elegant PHP…
$directorArray = $team['Director'];
$commaArray = $director->name;
$commaArray = array();
foreach ($directorArray as $director){
$commaArray[] = '<span>'.$director->name.'</span>';
}
echo implode( ', ', $commaArray );