Hi,

This might be very simple but I can't find it!
I would like to add a string of text before each taxonomy term.

For example instead of:
Sports

I would like to display:
Category: Sports

Can you please give me a hand?

Many thanks

Comments

sp_key’s picture

Anyone?
Not even a tiny suggestion? :)

What I am trying to do is display my content as normal but instead of showing the categories/topics/terms below my content show the word "Category:" before.

Lemme know if this doesn't make sense and I'll make a screengrab

verta’s picture

sp_key’s picture

Hi thanks for your suggestion but it isn't what I'm looking for.
I am not interested in altering the term page.
All I want is to display the word 'Category' plus the taxonomy term below my posts.
Exactly like the example I gave earlier on.

ryivhnn’s picture

The simplest thing I can think of is

Category: <?php echo $terms; ?> in your page.tpl.php or node.tpl.php.

which will work as per your example as long as things are only assigned to one category, otherwise you'll end up with things like

Category: Sports Croquet

There's also a way to echo the vocabulary name, might be <?php echo $taxonomy -> name; ?> but I'm guessing as I haven't needed to do it. But that would list anything tagged under your "Sport" vocabubulary as being in the "Sport" category.

works at bekandloz | plays at technonaturalist

bolecha’s picture

Did you find out?

What if there are two or more vocabularies? like category1, category2

Category1: echo $terms;
Category2: echo $terms;