Pass the category id into `get_category_link()`: <?php $category = get_the_category(); $link = get_category_link( $category[0]->term_id ); ?> **Update** Outputting in template: <?php $category = get_the_category(); $first_category = $category[0]; echo sprintf( '<a href="%s">%s</a>', get_category_link( $first_category ), $first_category->name ); ?>