Informations
This code loop on the post categories that is the default WordPress taxonomy. In this snippet, we get the category title with echo $cat->name and the category link with echo get_category_link($cat->term_id).
Code
<?php foreach (get_the_category() as $cat) : ?>
<?php echo $cat->name; ?>
<?php echo get_category_link($cat->term_id); ?>
<?php endforeach; ?>
Contribute to this page
name; ?>
term_id); ?>