Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gravatar]

Gravatar is the default avatar service for WordPress. Depending on the theme users and visitors who have registered with gravatar will see their avatar when they, for instance, leave a comment.

2
votes
2answers
174 views

How to replace any occurence of Gravatars with a local placeholder image?

Users can upload an avatar as a local image file on my website. If they didn't do so, it will fall back to the WordPress default (Gravatar). But I want any occurrence of Gravatar to be replaced with a ...
0
votes
0answers
31 views

Replace gravatar with user meta, by using filter

In this post, explains how to make my question. It filters user_avatar. I use same way with filtering user_avatar_url for using in <img src=""> Here is my code: function replaceAvatar( $url, $...
0
votes
1answer
435 views

i1.wp.com url problem (Jetpack not installed)

I added the following code to the functions.php file add_filter( 'avatar_defaults', 'new_gravatar' ); function new_gravatar ($avatar_defaults) { $myavatar = 'link'; $avatar_defaults[$...
1
vote
0answers
17 views

WordPress Gravatar filter is removing my custom attributes

I am trying to add a style attribute on all the custom gravatar images. However, it is removing the style attribute before final output. Here is the code I am using: $background = ''; $args = [$...
0
votes
1answer
312 views

How to get User Avatar Image with link to Author and User name in Html Title tag?

I'm wondering how could I achieve this result mixing the avatar image with href to author page and also when the mouse is over the image, show in "html title tag" the name of the user? I know I can ...
1
vote
0answers
144 views

Assign a random avatar to every user?

I have 10k users on my site and only around 1k of them are using custom avatars (through a shortcode avatar upload I have). The rest are using a default (and custom) singular gravatar image. I want ...
2
votes
1answer
206 views

Changing default Buddypress avatar affects all site avatars (because gravatar)

I've been looking for a way to change the default Buddypress avatar for members, and have managed it, partially just using the simple Buddypress codex info here. BUT The codex info doesn't quite do ...
0
votes
2answers
100 views

Gravatar image url is wrong?

I have this code that pulls a user's gravatar: if( $current_user->ID == 0 ) { // Not logged in. echo '<p><img src="'.get_stylesheet_directory_uri().'/img/wpb-default-gravatar.png" ...
1
vote
0answers
26 views

In this snippet how do I force the function to use gravatar rated G and fill in the alt for get_avatar()?

$title = sprintf( '%1$s<span class="vcard">%2$s</span>', get_avatar( get_the_author_meta( 'ID' ), 75, set_url_scheme( 'https'), '', '' ),//TODO Full avatar via gravatar ...
3
votes
4answers
177 views

How to output nothing instead of default avatar?

I am looking for a solution to output nothing instead the default avatar when a user does not have any avatar. I am currently using this line. I looked at the function and the only thing I got so far ...
1
vote
1answer
337 views

Use Gravatar as fallback image if no local image is not found

I have been trying to use Gravator's Identicon as the fallback image, is there is no image for a given user in a predefined image folder. consider the following scenario; User email : asd@asd.com ...
0
votes
1answer
1k views

How to add custom class to get_avatar()

I am using a custom walker class to customize my comments section. It uses the following code to get the comment author image from gravatar <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $...
3
votes
1answer
48 views

Replace comment avatars and links at the same time

I am trying to replace Wordpress comment author data: 1) Avatar (uploaded image instead of Gravatar) 2) Author link (link to author page as only members can comment) I have found a great solution ...
1
vote
0answers
16 views

Gravatar not showing when calling users details

I am pulling out users details from a custom role I have created which works great apart from the avatar. It did flash up and then refreshed disappeared again which is odd in itself... I can see the ...
1
vote
0answers
82 views

Custom avatar image link added to the profile page

I'm trying to create a custom author field, the user will past his profile image url. and replace his avatar which displayed in comments. the field : function custom_avatar_img($profile_fields) { $...
0
votes
1answer
490 views

Avatar picture does not display when using get_avatar

I'm using WordPress with bbPress and Gravatar for user avatars. I want to display the user's avatar next to their topic. I'm using: echo get_avatar( get_the_author_meta( 'ID' ), 32 ); Which get's ...
0
votes
1answer
418 views

Working with Gravatars within a localhost development area

Is is possible to add an author photo (gravatar), while developing our WordPress site offline in a /localhost environment? I see that the gravator process is requesting for an online site to be ...
0
votes
3answers
1k views

Wordpress User Gravatar images not displaying. Loading default instead

I'm trying to display user gravatars on this page http://gepc.themelot.com/survey-comparison/433747624/293281083/ but the page keeps showing the default 'mystery man' avatar. I inspected the page ...
3
votes
3answers
969 views

Custom user avatar in the Wordpress users listing

By default, Wordpress uses Gravatar for user avatars. I've created a custom field for avatar uploads, and I'm using this as users' avatars on various pages in the theme. In the admin - on the all ...
1
vote
0answers
468 views

Customize Avatar using user meta

I have a customer where all the users are synchronized through an API every night. This API gives me the profile picture for each user and it is stored as a user meta with meta_key = 'image'. Is ...
2
votes
1answer
598 views

Replace Gravatar with img URL for avatars

I have many, many WordPress authors. For each, I have used the custom wp_usermeta profile field "photo_url" to store URLs for different remotely-hosted avatar images. I am currently displaying these ...
2
votes
1answer
480 views

How to Add a Random Custom Gravatar in the WordPress Comments?

I have a client that has 5 different gravatar images, and would like them to be randomly used as the thumbnail for people's comments that have no Gravatar. I know how to change the Gravatar to a ...
2
votes
4answers
9k views

Replace Gravatar with uploaded images?

I've added functionality to upload profile picture by following THIS guide. I can't find an online guide or any documentation about WP hooks.. How to replace Gravatar profile pictures (in comment ...
-1
votes
1answer
873 views

How can I changing or replace user's avatar without plugins?

I want to change Gravatar from my website. But I don't know how to change it? Please some one help me. I do not want to use plugins. I need step by step instructions because I'm not expert.
2
votes
1answer
38 views

Get users only if Gravatar is specified

I would like to retrieve a list of 12 Wordpress users, but I would like to have them randomly (at each page reload) AND only 12 users that have a Gravatar specified. Right now, I have my 12 random ...
1
vote
2answers
719 views

How to change Gravatar size when using comments_template

I am trying to change default Gravatar size. Since I am using WP-generated comments template (using comments_template() function), I turned to filters and this is my custom code: function ...
0
votes
2answers
154 views

Adding avatars/gravatar to a Wordpress blog

I am trying to add avatars to my wordpress web site and I activated them through the settings - discussion as you would normally do. But because I have a very customised theme, I guess, it is not ...
0
votes
2answers
1k views

How do I get a post author's image/avatar via RSS from another blog?

I have 2 websites: one is a company website, the other is a blog for the company - these sites are on separate domains. On the homepage of the company website, there's a square tile featuring the ...
0
votes
0answers
143 views

GravatarLocalCache Plugin Broken in WordPress 4.2

Trying to fix a plugin (https://wordpress.org/plugins/gravatarlocalcache/ not mine) which broke on the 4.2 update. The plugin makes a locally cached version of Gravatar.com avatars. Plugin hasn't ...
0
votes
2answers
71 views

Wordpress shows admin's avatar after editing a comment

Recently I updated my wordpress to 4.2.1 and now I have a problem with editing people's comments. After editing them, the avatar picture of who edited the comment is shown instead of the avatar of the ...
3
votes
2answers
308 views

Filtering the default avatar list

I'm using the avatar_defaults filter hook to filter the default avatar list. For example: function my_avatar_defaults( $avatar_defaults ) { $avatar_defaults['http://example.com/foo.png'] = __( '...
3
votes
1answer
650 views

Wrong gravatar showing up?

I've got an install that's loading the wrong gravatar and I can't figure out why. Most confusing is that it's doing it in the front-end templates AND in the admin. Here's a screen cap: The user and ...
0
votes
2answers
700 views

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

Is there a way to get all users that: 1) uploaded an avatar or 2) have a Gravatar? I want to filter users that doesn't meet one of these conditions. UPDATE I forget to mention that this is for ...
0
votes
1answer
2k views

Show custom default avatar instead of gravatar

I'm using this custom function to get the default avatar from my server instead of gravatar: if(!function_exists('custom_avatar')){ function custom_avatar($avatar_defaults){ $...
0
votes
1answer
156 views

Increase Comment Author Gravatar Size On WordPress Default Comment Function

I am new to WordPress theme development. I am designing a new theme and using less codes and file as I am starting from basic. I am adding comments and comment form in my single.php using <?php ...
4
votes
2answers
3k views

Custom Gravatar not working

I'm trying to upload a custom Gravatar to Wordpress, however something is breaking the image link and I'm not sure how to fix it. add_filter( 'avatar_defaults', 'new_default_avatar' ); function ...
3
votes
3answers
3k views

How do I add a custom HTML attribute to get_avatar?

I'm trying to add Pinterest's nopin="nopin" HTML attribute to the comment avatar image tags on my blog. Here's the function I'm using to call the avatar on each comment: get_avatar($comment, 50, ...
0
votes
1answer
122 views

Adding custom avatar field to comments

I want to store a users Twitter Profile Image when I found out that they've tweeted the link of a post (by using the Twitter API), but I'm stuck with the following issue: How do I store the Profile ...
1
vote
2answers
1k views

custom default avatar showing broken link

I am using the follow function to create a custom default avatar for users who comment and do not have a gravatar setup. if(!function_exists('custom_avatar')){ function custom_avatar($...
0
votes
2answers
232 views

Which Function Displays The Post Authors Gravatar

I am using: echo get_avatar(get_the_author_id(), 30); Which works, however i am getting this notice to use: echo get_avatar(get_the_author_meta(), 30); Which doesn't display the authors Gravatar ...
0
votes
1answer
702 views

How to change the gravatar image from front end?

How can user change the own gravatar image from front end? for the back-end there are lot of plugins (like user photo etc.), by which user can easily change the gravatar image?
0
votes
0answers
343 views

Disable Gravatars in WordPress

I have found this code for disable gravatar on email but it not work on 100% why? Because it replace online image but the image always open with gravatar domanin.. function __default_local_avatar() { ...
0
votes
2answers
671 views

Show author name not the author ID

I have added the code to get the author, but it displays the author's ID number. How can I get the author's name to show and their gravatar. CODE <?php $product_pages_args = array( 'meta_key' ...
2
votes
2answers
965 views

Use local image for default avatar

I tried putting this snippet in my functions.php add_filter( 'avatar_defaults', 'newgravatar' ); function newgravatar ($avatar_defaults) { $myavatar = get_bloginfo('template_directory') . '/...
0
votes
4answers
545 views

Which core file is responsible for gravatars?

I realize modifying the core files is frowned against but I strongly believe that the WP core SHOULD NOT rely on external links. In my situation, I'm behind the Great Chinese Firewall, the gravatar ...
1
vote
2answers
1k views

Cannot get local avatars to show [closed]

See updates below. I upgraded to 3.7.1 using svn. I did this on my localhost first to make sure everything is fine. Everything was, so I proceeded to do it on the server. However, on the server, the ...
0
votes
1answer
2k views

Change the “Default Avatar” admin option via functions.php

So I'm trying to add a new default avatar for my theme using the following code: add_filter( 'avatar_defaults', 'mytheme_default_avatar' ); function mytheme_default_avatar ( $avatar_defaults ) { ...
0
votes
1answer
289 views

Simple Local Avatar Plugin

I think that Im very close to achieve my goal.. I have this function on my themes but I need a help to find the right way to call simple local avatar function so it will show the local avatar image ...
1
vote
1answer
895 views

get_avatar won't show uploaded avatar, only default gravatar

I'm using the Simple Local Avatars plugin so my bbPress forumgoers can upload their own avatars. Now, when a user logs in, I want his/her avatar to display next to the relevant links (i.e. logout, ...
0
votes
1answer
78 views

Fetching Gravatar

How can I fetch anyone’s gravatar image? I need to show users gravatar image on a custom profile page that am making. I have so far integrated the option of Facebook Profile Pic (which automatically ...