I use the function below to get category name and then output category link as well. Is there a way that I can add a class to the category name only (want to put background color only for the category name )?
<?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
<a href="<?php echo get_category_link($category[0]->cat_ID); ?>" title="<?php echo $category[0]->cat_name; ?>">Leggi tutti</a>
[....]