Gravatar always shows default image

I worked out I needed to add quotes around the parameter. echo get_avatar(get_the_author_meta(‘user_email’), ’70’, “‘” . get_bloginfo(‘template_directory’).”/images/default.png'”);

Simple Local Avatar Plugin

The get_avatar function is pluggable, meaning that you can define a function of your own having that name and completely overwrite the default function. If you look at the source for the “Simple Local Avatars” plugin, that is exactly what it has done. get_avatar in your code should be using the function defined by “Simple … Read more

How to get all users that uploaded avatars or have gravatars? [closed]

This function bp_get_user_has_avatar() calls bp_core_fetch_avatar with this argument ‘no_grav’ => true so you could write your own function to see if a user is not using the default avatar: function lurie_avatar_check( $user_id ) { $retval = false; if ( bp_core_fetch_avatar( array( ‘item_id’ => $user_id, ‘no_grav’ => false, ‘html’ => false ) ) != bp_core_avatar_default( ‘local’ … Read more

Adding avatars/gravatar to a WordPress blog

You’re looking for the get_avatar function, documented here get_avatar( $id_or_email, $size, $default, $alt ) You’ll need either a user ID, or an email to use it, something like this should do the trick: echo get_avatar( get_comment_author_email(), ‘thumbnail’ ); If avatars are turned off in settings, this function will not return anything

Avatar picture does not display when using get_avatar

The get_avatar function is a pluggable function with it’s first parameter being either the user’s ID or email. You’re using get_avatar with get_the_author_meta(‘ID’) which should give you the ID of the current user within the Loop. From the Codex If used within The Loop, the user ID need not be specified, it defaults to current … Read more

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