Make first letter of my taxonomy uppercase

I’m using

echo get_the_term_list( $post->ID, 'trpropcity', '', ' ', '' );

to show a taxonomy link, I’d like to make this instance of it only have the first letter capitalized, Cleveland not CLEVELAND, I realize I could just change the taxonomy, but I actually want it all caps everywhere else on the site, so I figured it would be best to just change it once. I’ve been playing with ucwords and strtolower but haven’t had any success yet.

3 Answers
3

Build the links yourself:

$terms = get_the_terms($post->ID, 'trpropcity');
if($terms)
  foreach($terms as $term)
    echo '<a href="'.get_term_link($term, 'trpropcity').'">'.ucwords(strtolower($term->name)).'</a>';

Leave a Comment