Image alt tag
-
Hi, would it be possible for the author’s gravatar to display their name in the alt tag?
Currently this is what it looks like on our site:
<li><img alt="" src="http://1.gravatar.com/avatar/b4dabf8cb04afd92762df081bbcb65b1?s=35&d=retro&r=G" class="avatar avatar-35 photo" height="35" width="35"> <a href="http://www.technologybloggers.org/author/admin/" title="Christopher's Archive">Christopher Roberts</a> (190)<br></li>
notice the alt tag is empty… could it not show this
<li><img alt="Christopher Roberts" src="http://1.gravatar.com/avatar/b4dabf8cb04afd92762df081bbcb65b1?s=35&d=retro&r=G" class="avatar avatar-35 photo" height="35" width="35"> <a href="http://www.technologybloggers.org/author/admin/" title="Christopher's Archive">Christopher Roberts</a> (190)<br></li>
We have used the plugin for a while now on Technology Bloggers, and really like it.
Also, is there any possibility of adding a feature to exclude specific authors? I know admins can be excluded, but could a more selective method be added, so any author could be excluded?
Thanks 🙂
Christopher
-
Hi Christopher,
I’m a little bit short of time this week, but will make a img alt fix for you (and the rest).
The exclude users is a little bit more work, so i’m considering that, but not on the real short time.A quick fix for you is change line 210 of top-authors.php to:
from:
$gravatar = get_avatar($user->ID, $gravatar_size);
to:
$gravatar = get_avatar($user->ID, $gravatar_size, ” , $user->display_name);To make this in a new version is a little bit more… because the alt text should be customisable for the user… I think.
cheers, and great to hear you like the plugin.
That’s great, thank you very much 🙂
- The topic ‘Image alt tag’ is closed to new replies.