Set default avatar network-wide

The avatar_default is the better option. add_filter(‘pre_option_avatar_default’, ‘se72578_avatar_default’); function se72578_avatar_default( $option ){ return ‘http://example.com/your/default/here.jpg’; } Simple. Stick that in a mu-plugin and you’re good to go. Edit: If you want to still allow site owners to change the default avatar, use the default_option_avatar_default hook instead.

How to change user`s avatar?

Avatars are meant to be controlled by the user, not by you. So yes, in a way, you’re being forced to use the Gravatar service. But remember, it gives the user the ability to use the same avatar anywhere, and you can always restrict the display of a gravatar based on content ratings (G, PG, … Read more

Alternative to using get_avatar function?

The get_avatar() function applies a get_avatar filter hook, that you can use to change the avatar markup: return apply_filters(‘get_avatar’, $avatar, $id_or_email, $size, $default, $alt); I think this would be the correct way to hook into this filter: function mytheme_get_avatar( $avatar ) { $avatar=”<img src=”https://wordpress.stackexchange.com/questions/22728/<” . get_template_directory_uri() . ‘/images/authors/’ . get_the_author_ID() . ‘.jpg” alt=”‘ . get_the_author() … Read more

Removing Gravatar.com support for WordPress and Simple Local Avatars

If you want a super-lightweight solution and don’t mind dabbling in a little code, drop this in your functions.php; function __default_local_avatar() { // this assumes default_avatar.png is in wp-content/themes/active-theme/images return get_bloginfo(‘template_directory’) . ‘/images/default_avatar.png’; } add_filter( ‘pre_option_avatar_default’, ‘__default_local_avatar’ ); Alternatively, if you want a bit more juice, with the ability to manage everything in the admin, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)