<?php
//the_category expanded to support custom taxonomies, with possibility to exclude certain categories/terms
function the_category_except($excludedcats = array(),$tax,$showlink = true){
	$categories = get_the_terms($post->ID,$tax);
	function catOut($category_placeholder,$showlink_placeholder,$tax_placeholder) {
		$text = '';
		$text .= '<li>';
		if ($showlink_placeholder) {$text .= '<a href="' . get_term_link($category_placeholder->term_id,$tax_placeholder).'" title="'.$category_placeholder->name.'"'.'>';}
		$text .= $category_placeholder->name;
		if ($showlink_placeholder) {$text .= '</a>';}
		$text .= '</li>';
		return $text;
	}
	foreach($categories as $category) {
		if ($excludedcats) {
			if ( !in_array($category->term_id, $excludedcats)) {
				echo catOut($category,$showlink,$tax);
			}
		} else {
			echo catOut($category,$showlink,$tax);
		}
	}
}
?>