I’m having the same issue on the homepage of a site i am building.. There is a module called “Advanced Category Excluder” But it seems like overkill for something simple like this that can be handled with some php code..
I’m having the same issue… any help???
Here, i found this on google.
<?php
//edit below for categories you want excluded
$exclude = array("Featured", "Uncategorized");
//how do you want the list separated? just a space is okay
$separator = " | ";
//don't edit below here!
$new_the_category = '';
foreach((get_the_category()) as $category){
if (!in_array($category->cat_name, $exclude)){
$new_the_category .= '<a href="'.get_bloginfo(url).'/'.get_option('category_base').'/'.$category->slug.'">'.$category->name.'</a>'.$separator;
}
}
echo substr($new_the_category, 0, strrpos($new_the_category, $separator));
?>
hope it helps.
A nicer alternative building upon http://wordpress.org/support/topic/140469 but using category IDs instead of names, can be found here: http://www.smashingthemes.com/blog/how-to-remove-categories-from-the_category-function-in-wordpress/
function the_category_filter($thelist,$separator=' ') {
if(!defined('WP_ADMIN')) {
//Category IDs to exclude
$exclude = array(1,5);
$exclude2 = array();
foreach($exclude as $c) {
$exclude2[] = get_cat_name($c);
}
$cats = explode($separator,$thelist);
$newlist = array();
foreach($cats as $cat) {
$catname = trim(strip_tags($cat));
if(!in_array($catname,$exclude2))
$newlist[] = $cat;
}
return implode($separator,$newlist);
} else {
return $thelist;
}
}
add_filter('the_category','the_category_filter', 10, 2);