How do I remove a colon from a label?

Brett F picture Brett F · Sep 20, 2011 · Viewed 8.3k times · Source

I've Googled for an answer, but most posts seem to be talking about labels within forms. I have custom fields set up in content block in Drupal 7. When I show the titles (labels) of those custom fields, it adds a colon after after the title. Is there a way to remove them?

Answer

Clive picture Clive · Sep 20, 2011

You need to override field.tpl.php to do this (the colon is hard coded into that template file).

Create field.tpl.php anywhere in your theme folder, copy the code from the above link into it, tweak it (remove the colon etc), then clear your caches: all will be well!