Codex tools: Log in
Contents |
Displays the terms of a custom taxonomies.
<?php the_terms( $id, $taxonomy, $before, $sep, $after ); ?>
(false|wp_error)
or
Displays the terms of a custom taxonomies separated by user defined characters.
get a list of current posts categories:
<?php the_terms( $post->ID, 'category', 'categories: ', ' <span style="color:#000">/</span> ', '' ); ?>
The output of above code will be: categories: TV / Speaker / Monitor
Since: 2.5.0
the_terms() is located in wp-includes/category-template.php.