so I've got usernames with mixed case, but I need to output them all lowercase with something like comment_author_link; how can I do that?
so I've got usernames with mixed case, but I need to output them all lowercase with something like comment_author_link; how can I do that?
just wrap the comment_author_link in a span tag and style it.
Like this
<span style="text-transform:lowercase;"><?php comment_author_link() ?></span>
Also, if you are already wrapping the comment author link within a paragraph or something, you could gain greater flexibility by doing this in your template:
<p class="lowercase"><?php comment_author_link() ?></p>
and then in your style sheet you can add a rule for this:
.lowercase {text-transform: lowercase;}
This would allow you to re-use that class if you want to force more items to be lowercase. This reduces repetition and keeps all your style rules in one place.
Obviously the above method will work absolutely fine though :)
hi guys.
I can't use text-transform because I'm referencing a filename in an image tag; it's gotta be legit lowercase text.
I was trying to use some kind of print_r, but I'm thinking maybe I just need to reference the username instead of the display name.
Is there a way to force the output of a function back into a variable so I can manipulate the string? I thought I could with print_r and the true flag.
fixed, I used
echo strtolower(get_comment_author());
This topic has been closed to new replies.