• Resolved studiostekker

    (@studiostekker)


    I’ve been working on a custom theme for a client, and I’m using this plugin. The back-end is working great. If they set an image for a teammember, it shows on the back-end in the overview just fine.

    However, on the front-end whenever I use the function get_avatar, get_avatar_url, or even get_simple_local_avatar, it will always return the default gravatar grey image. Only the avatars set by a Gravatar account, it shows up. What am I missing here??

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Darin Kotter

    (@dkotter)

    @studiostekker All three of those functions should return the proper avatar. Are you using any other plugins that may be conflicting here? Simple Local Avatars will filter the result from the core WordPress avatar functions, so in theory, if you have another plugin that does the same thing, that could cause issues.

    The other thing to look at is if you’re using the force_default argument. That is an accepted argument for the core get_avatar_data function and if that is set, we don’t return a local avatar. It doesn’t sound like you’re using that but that is one thing to check.

    If none of that helps, I’d suggest (if possible) trying to debug the response from our get_avatar_data method (currently line 73 in includes/class-simple-local-avatars.php). This is the method that adds the local avatar to the core avatar functions.

    Thread Starter studiostekker

    (@studiostekker)

    I got it working, thank you! I was capturing the get_avatar_url on a user object. I would think this would give an error, but instead it was working and gave the proper Gravatar URL of that user (not the custom one). Now I’m getting the get_avatar_url on a user ID and it shows the right one. Derp.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t get avatars to show in my custom theme’ is closed to new replies.