The tag has no usage guidance.

learn more… | top users | synonyms

6
votes
2answers
8k views

Removing Gravatar.com support for WordPress and Simple Local Avatars

Currently I'm using Simple Local Avatars on several of my blogs allowing people to upload their own custom avatar. As far as I know Simple Local Avatars uses get_avatar to check whether a custom ...
4
votes
2answers
1k 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
4answers
1k views

If Else Gravatar Author Picture

Ok so i have added a custom field inside of the WordPress edit profile field where a contributor and above can add a custom image if they do not use gravatar. Now i am trying to write a if else ...
3
votes
2answers
367 views

I want to display author gravatar on posts. How to do this?

I just want to add author gravatar near the name of the author. I know that I have to add something in the single.php file, but what to add? Thanks!
3
votes
4answers
2k views

Upload gravatar in WP profile?

I'm interested in the theory of a user being able to register/upload a gravatar directly in their user account within a hosted WP system. Is this feasible?
3
votes
1answer
148 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 ...
2
votes
3answers
3k views

Setting different width and height for gravatar

I've been trying to set a different width and height using the get_avatar function. I need to set the author's avatar in single.php to 60x40 size. So let's say the gravatar looks like this: when ...
2
votes
1answer
54 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
1answer
26 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 ...
2
votes
2answers
84 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'] = __( ...
1
vote
2answers
4k views

How to get gravatar url alone

I would like to use gravatar image as background image for a button. When i use get_avatar function it returns with height width src parameters. But i need only gravatar url. I mean like ...
1
vote
1answer
1k views

get_avatar() default image not working as of wp 3.5 [closed]

As of upgrading to wp 3.5 the get_avatar function started not pulling in my default backup image. This has worked for many years this way and curious to why it would stop. I am using the normal use of ...
1
vote
3answers
186 views

Add gravatar to author list

I am using this code for listing out all authors on the site in my sidebar. It works, except I also need to pull in their Gravatar image. It's working in a loop on the homepage with this <?php ...
1
vote
2answers
753 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 ...
1
vote
2answers
1k views

Alternative default avatar generator?

Most of the commenters at my WordPress blog do not have a Gravatar account. Hence the comment section is almost always filled with the same old mystery man avatars. I am looking for custom gravatar ...
1
vote
2answers
444 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') . ...
1
vote
1answer
157 views

Can I hook into get_avatar to supply a hash instead of an email?

I'm writing a plugin to PPK encrypt non-public comment data as a second line of defence against crackers (one of my sites was recently compromised, so I have been rather spurred into action!). To ...
1
vote
2answers
925 views

Replace default avatar

I've searched google quite a bit and every site has the same filter but it doesn't seem to be working for me. Not sure if it's my setup or just old code. I'm trying this: add_filter( ...
1
vote
2answers
2k views

get the avatar url instead of an html img tag when using get_avatar?

i want to get the user avatar URL to use it as background URL style for a div. i tried to use the following but it does not return anything when i view the code it appears like that. background: ...
1
vote
3answers
1k views

get_user_meta Short Profile Section

Ok so i have added a custom field into the users edit profile page where they can add a link to a url of an image they want. I am currently using this for contribitors and above but i also have a ...
1
vote
1answer
35 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 ...
1
vote
3answers
1k 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, ...
1
vote
2answers
149 views

Force users to display default Gravatars

Is it possible for a WordPress site to display the users default Gravatar image (of chosen set, eg Retro, Identicon, etc), rather than the users uploaded avatar? As in, all user avatars next to ...
1
vote
2answers
435 views

Snippet for own (gr)avatars

Following snippet used(and works great) but generates a redirect chain :(. If (function_excists('basicgravatar') function basicgravatar ($avatar_defaults) { $myavatar = ...
1
vote
0answers
35 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 ...
1
vote
2answers
500 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 ...
1
vote
1answer
117 views

Remove hovercard for only certian gravatars

I am using the Extended Gravatar plugin by Reza Moallemi and it works great. However, on my about page I have a large gravatar to show the author. I would like to know if there is a class I can add to ...
0
votes
4answers
290 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 ...
0
votes
2answers
152 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
57 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 ...
0
votes
2answers
662 views

Gravatar - Default IMG

Gravatar is slowing my website and I want to host mystery man on my main server. So this is my normal gravatar mystery man <img class="avatar avatar-68 avatar-default" width="68" height="68" ...
0
votes
1answer
59 views

Gravatar Size Via Theme Functions?

Currently, to call comments I am simply using: <?php wp_list_comments(); ?> in comments.php. This is calling up gravatars, which I would like to be able to set the size of. How can I set ...
0
votes
2answers
72 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
340 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
2answers
368 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
772 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
141 views

Gravatar always shows default image

When I call the following code: echo get_avatar( get_the_author_meta('user_email'), '70', get_bloginfo('template_directory')."/images/default.png" ); It generates the following: ...
0
votes
1answer
237 views

Default Gravatar not showing for pings

Here is my comments block: <div id="comments"> <?php if (have_comments()) : ?> <h3><?php printf(_n('1 comment', '%1$s comments', get_comments_number()), ...
0
votes
2answers
135 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 ...
0
votes
2answers
104 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
0answers
27 views

Link Gravatar to Author Posts in Genesis

I'm using Genesis and want to link the author's Gravatar to their author page. //* Add gravatar before entry title add_action( 'genesis_entry_header', 'bg_entry_gravatar', 7 ); function ...
0
votes
0answers
103 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
42 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 ...
0
votes
1answer
214 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
100 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 ...
0
votes
1answer
89 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 ...
0
votes
1answer
271 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
105 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
235 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' ...
0
votes
1answer
134 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 ...