Get post category as a separate string and url
First you have to find the category ID, which can be done easily with the function get_the_category(). To get the slug, use: $catID = get_the_category(); $catSlug = $catID->slug. To get the link: $catLink = get_category_link($catID).