Tag Info

Hot answers tagged

7

I think the problem is simply that your default avatar isn't publicly available. Try for example http://upload.wikimedia.org/wikipedia/en/b/b0/Avatar-Teaser-Poster.jpg instead of http://loalhost:888/wordpress/wp-content/themes/blog-theme/img/icons/avatar.jpg Notice that the default gravatar is served via http{|s}://i{0,1,2}.wp.com/... From the docs: ...


4

Notice: get_the_author_ID is deprecated since version 2.8! Use get_the_author_meta('ID') instead. in C:\Users\Administrator\Desktop\www.wpsites.dev\wp-includes\functions.php on line 2908 You aren't using get_the_author_meta('ID'); as instructed by the Notice. You are just using get_the_author_meta(). The latter returns an empty string when I try ...


1

I successfully replaced all gravitar.com avatars with my own locally hosted avatar image by adding this to my theme's function.php file: define('DEFAULT_AVATAR_URL', get_template_directory_uri() . '/images/user.png'); function no_gravatars( $avatar ) { return preg_replace( "/http.*?gravatar\.com[^\']*/", DEFAULT_AVATAR_URL, $avatar ); } add_filter( ...


1

You have the Photon module enabled in the Jetpack plugin. That module routes your images through WordPress.com's CDN. If you don't want this to happen, disable the Photon module in Jetpack.


1

I've been looking up how to do this myself and that same function shown above everyone keeps suggesting isn't working, perhaps due to a recent update to WP's codebase, I'm not entirely sure. It's a little hackish and it involves editing core files (not good) but it's a work-around solution. Here's the steps: Use the same function specified in the original ...


1

When looking at the source of get_avatar(), you can see that it takes either ID or email as 1st argument: get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ); The source of get_the_author_meta() shows that it will return data for the following fields: 'login', 'pass', 'nicename', 'email', 'url', 'registered', 'activation_key', 'status' ...



Only top voted, non community-wiki answers of a minimum length are eligible