Add gravatar to author list

Basic setup <?php $args = array( ‘orderby’ => ‘nicename’ ); $users = get_users( $args ); foreach ( $users as $user ) { $avatar = get_avatar( $user->ID, ’80’ ); echo ‘<li><a href=”‘ . $user->user_url . ‘”>’ . $avatar . ‘<br />’ . $user->display_name . ‘</a></li>’; } ?> Excluding the Admin User Either check in the foreach: … Read more

Wrong gravatar showing up?

If you go to http://gravatar.com/d6b10d5767d1e29006c11e1a2c590f3c (omit the /avatar/ from path) you get http://gravatar.com/clojita which seems to be your gravatar account, correct? MD5 collision is unlikely (but maybe it’s time to buy a lottery ticket 🙂 Look at source fetches interesting detail — the comment in question has comment-author-clark class. So it’s not only the gravatar … Read more

Filtering the default avatar list

You are doing it correctly. The call to gravatar.com passes the location of your custom image so that WP can load it. Take a look at the query string in the src, you’ll see your image location. That’s how it works.

How to check if gravatar of user is the default’s one?

I had a look at the avatar related functions/filters WP provides and I don’t think there is a direct way to tell, if the avatar is a real one or the default image as you only have url to work with. But, I also looked at the Gravatar implementation guide, https://en.gravatar.com/site/implement/images/, which notes that you … Read more

Upload gravatar in WP profile?

If you are looking to connect your sites sign-up with Gravatar then you simply can’t, since Gravatar don’t have a sing-up api you can use. But if you are just looking to let your users upload there own photos the either Simple Local Avatars Plugin that Chip suggested or one I’ve used a lot before … Read more

If Else Gravatar Author Picture

You need to use get_the_author_meta() instead of the_author_meta() <?php $authorpic = get_the_author_meta(‘author_pic’); if ($authorpic) echo $authorpic; else echo get_avatar( get_the_author_email(), ’80’ ); ?>

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