Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with default gravatar #158

Closed
yannc2021 opened this issue Apr 18, 2018 · 1 comment
Closed

Problems with default gravatar #158

yannc2021 opened this issue Apr 18, 2018 · 1 comment

Comments

@yannc2021
Copy link

I am using a plugin which allows users to upload their own avatar without using gravatar. The plugin adds a filter to the wordpress get_avatar() function to fetch the picture uploaded by user. But the avatar shown in posts and comments are still using the default gravatar.

This is the piece of code in user.js that's causing the problem.
userAttributes.avatar = 'https://gravatar.com/avatar/' + userAttributes.hash + '?d=' + defaultAvatar;

How can I modify the templates to display the avatar in posts and comments using get_avatar() so it can be compatible with the other plugin filter?

I tried <?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?> but it's fetching avatar of the same author for every post.

@mrjarbenne
Copy link

Related: #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants