I have a loop of posts for a custom post type I built.
How can i call the link of the category/taxonomy for each post?
Thanks
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityUse get_term_link();
for example:
$terms = wp_get_post_terms( $post->ID, 'category');
echo '<ul>';
foreach ($terms as $term) {
echo '<li><a href="'.get_term_link($term->slug, 'category').'">'.$term->name.'</a></li>';
}
echo '</ul>';