Informations
This code loop on the terms of a taxonomy. In this snippet, we get the category title with echo $term->name and the category link with echo get_term_link($term).
Code
<?php
$terms = get_terms(array(
‘taxonomy’ => ‘taxonomy_name’,
‘hide_empty’ => true,
));
?>
<?php foreach ($terms as $term) : ?>
<?php echo $term->name; ?>
<?php echo get_term_link($term); ?>
<?php endforeach; ?>
Contribute to this page
'taxonomy_name',
'hide_empty' => true,
));
?>
name; ?>