Display 1 category only with get_the_category (by ID or slug)

I think you could do something like this:

$categories = get_the_category();
$displayed_category_id = 1; // set this to the category ID you want to show
$output="";
if($categories){
    foreach($categories as $category) {
            if ( $displayed_category_id == $category->term_id) {
                  $output .= '<a href="'.get_category_link($category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$category->cat_name.'</a>';
           }
    }
echo $output;
}

It might not be the most efficient code (and it’s untested) but it should work…?

You could swap out the slug or category name pretty easily if ID isn’t the key you’d like to use. G’luck!