Wordpress - get_the_term_list without links in 3.1

However @anu is right, I figured out you can call the php function strip_tags to strip out the tags of the return value.

$terms = get_the_term_list( $post->ID, 'tags' );
$terms = strip_tags( $terms );

wp_get_object_terms() returns the terms associated with an object (eg a post or a page or custom post) as text (normally in an array).

From the Codex page for wp_get_object_terms()

$productcategories = wp_get_object_terms($post->ID, 'productcategories');


I think the best way is to implement a filter for the term list, that extract via regexp only the text, from the list

get_the_terms_list() is implemented here: http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/category-template.php#L948.

 $term_links = apply_filters( "term_links-$taxonomy", $term_links );

You can implement you own filter.