06 Jul 2018

Display URL of a custom post types taxonomy term

Use the following snippet to display the URL of a custom post types taxonomy term. Just replace the word position with the name of the taxonomy.


<?php
$terms = wp_get_post_terms($post->ID, 'position');
foreach ($terms as $term) {
echo get_term_link($term);
}
?>