hey everybody!
to exclude a specific category at the "the_category" tag you can use this piece of code in your functions.php.
function the_category_filter($thelist,$separator=' ') {
if(!defined('WP_ADMIN')) {
//list the category names to exclude
$exclude = array('Something','Something Else','Blah','YAY');
$cats = explode($separator,$thelist);
$newlist = array();
foreach($cats as $cat) {
$catname = trim(strip_tags($cat));
if(!in_array($catname,$exclude))
$newlist[] = $cat;
}
return implode($separator,$newlist);
} else
return $thelist;
}
add_filter('the_category','the_category_filter',10,2);
(this ist from: http://wordpress.org/support/topic/140469)
It works good.
BUT:
What should I do when I have categories with umlauts, for example "ü" "Ö" "ß"...
The part "$exclude = array('Something','Something Else','Blah','YAY');" just accepts the real names...
is there a possibility to use category-slugs or category-ids?
Thank you so much!!