<li><?php $category = get_the_category(); echo '<a href="'.get_category_link( $category[1]->term_id ).'">'.$category[1]->cat_name.'</a>'; ?></li>