I\'ve been trying to use get_avatar to display the author\'s gravatar under each post in wordpress template with applied class but I couldn`t find a way to add
I think the best way to handle this would be to use a filter, rather than using jQuery as George suggests. You would simply add this to your theme's functions.php file.
add_filter('get_avatar','add_gravatar_class');
function add_gravatar_class($class) {
$class = str_replace("class='avatar", "class='avatar pic-2", $class);
return $class;
}
*Note, I've not tested this, but believe it will work. See this thread for more info.