This code:
<?php the_terms($post->ID, 'type') ?>
Gives:
<a href="/archives/type/image" rel="tag">Tag</a>
What do to if I want to display only “Tag” word, not link eg.
Tag
Thanks!
This code:
<?php the_terms($post->ID, 'type') ?>
Gives:
<a href="/archives/type/image" rel="tag">Tag</a>
What do to if I want to display only “Tag” word, not link eg.
Tag
Thanks!
You must be logged in to post a comment.
While you can specify separators and such in
the_terms()
arguments, it assumes that you actually want links.You can discard unwanted HTML by using filter:
Or just use deeper
get_the_terms()
function and iterate through its return to build your own markup.At a super-duper simple scale, what about just: