Exclude categories from the_category();

Try using the filter get_the_categories and replace every occurrence of the_category by echo get_the_category() (just to be sure !)

This is what I cooked:

<?php
add_filter('get_the_categories', 'exc_cat');

function exc_cat($cats) {
        //not on admin pages
        if(!is_admin()){
            $exc = array('lipsum', 'dolor');
            foreach ($cats as $i=>$cat){
                if(in_array($cat->name, $exc)){
                   unset($cats[$i]); 
                }
            }
        }
    return $cats;
}
?>

Try my code and let me know if it does your job.

tech