get_avatar filter is not working as per requirement
Question
I have an author loop with a profile picture that saves into ACF custom fields and I want to use it as get_avatar but it returns blank.
Here is a snippet:
$get_avatar = get_user_meta($user->ID, "wp_user_avatar");
$avtar = add_filter( 'get_avatar', wp_get_attachment_image($get_avatar[0], 'thumbnail') , 10, 3 );
Now,
<div class="profile-photo"><?php echo get_avatar($user, 100); ?></div>
it shows blank div
0
custom-field, gravatar
4 years
2020-02-17T08:38:21-05:00
2020-02-17T08:38:21-05:00 0 Answers
62 views
0
Leave an answer