Skip to main content

List all the terms in a custom taxonomy, without a link:

$terms = get_terms("my_taxonomy");
 $count = count($terms);
if ( $count > 0 ){
    echo "<ul>";
    foreach ( $terms as $term ) {
      echo "<li>" . $term->name . "</li>";
    }
     echo "</ul>";
 }  

List all the terms, with link to term archive, separated by an interpunct (·). (language specific, WPML method):

$args = array( 'taxonomy' => 'my_term' );
$terms = get_terms('my_term', $args);
$count = count($terms); $i=0;
if ($count > 0) {
    $cape_list = '<p class="my_term-archive">';
    foreach ($terms as $term) {
        $i++;
        $term_list .= '<a href="/term-base/' . $term->slug . '" title="' .sprintf(__('View all post filed under %s', 'my_localization_domain'), $term->name) . '">' . $term->name . '</a>';
        if ($count != $i)
          $term_list .= ' &middot; '; 
        else 
           $term_list .= '</p>';
    }    
echo $term_list;}

For more details: get_terms().