Questions tagged [avatar]

An avatar is a graphical representation of a user

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

How to give users a fixed gallery of avatars to choose from?

I have the exact same question as the gentleman who started this thread a year ago: https://wordpress.org/support/topic/possible-to-give-users-a-gallery-of-avatars-to-choose-from/ — that is, “I’m ...
user avatar
0 votes
1 answer
40 views

How do I add nopin="nopin" to the default avatar?

I noticed that if someone clicks on my Pinterest share button on a blog post, several unrelated images show up. I was able to use nopin="nopin" per Pinterest's documentation on most of these ...
user avatar
  • 7
1 vote
0 answers
21 views

Adding an Avatar to the Top Nav Bar

I am attempting to add an avatar image to the top nav menu. I am currently using this function, which takes a custom link and replaces it with the currently logged in user's name. That part of the ...
user avatar
  • 11
-1 votes
1 answer
131 views

How to display user's avatar on the top of main menu in WordPress admin panel?

I got a requirement to update the WordPress's admin panel, where I need to display the current user's avatar on the top of admin's main menu(see the screenshot).
user avatar
0 votes
1 answer
209 views

How do I get a smaller size of an avatar image

I have a function that creates a bio-line at the top of every post. One part gets the avatar of that user, that he uploaded in WordPress (I use a plugin so people don't need to use Gravatar for this). ...
user avatar
0 votes
0 answers
41 views

get_avatar() is not working in my custom theme

I have used this code to display author image. It was working in Local By FlyWheel but isn't working on a live site. It's not working means that it is not producing any HTML. <?php $post_id =...
user avatar
0 votes
1 answer
610 views

How to upload WP user avatar on woocommerce account page [closed]

I am using WP User Avatar Plugin instead of gravatar for user profile. But gravatar is not working so well. I want to add image upload field on woocommerce account page. How can I do that? Please help....
user avatar
  • 101
0 votes
1 answer
32 views

How to add custom user avatar in wordpress

I use below code for adding media uploader to user edit profile page WP. Now, how to use in for show in single.php page? I have an error in single page: <img src="<br /> <b>Notice&...
user avatar
0 votes
1 answer
41 views

How is it possible to current user info on page in WordPress?

I am new at WordPress. I have need to display current user info on page: avatar, name, lastname, login... I have spent several hour on web, but could not find clean solution: How is it possible to do ...
user avatar
2 votes
2 answers
371 views

Listing all users by their avatars in wordpress

I want to list pictures of all avatars how do I do this
user avatar
1 vote
0 answers
301 views

How to change user avatar using REST API?

I've tried all the methods, but nothing works. When creating a new user with the avatars URLs already specified for the pictures, nothing happens either.
user avatar
  • 111
0 votes
1 answer
127 views

List of all authors avatars

I'm looking for a way to retrieve all authors with their avatar. I know there is a way to get an authors avatar but I want to get all avatars of all the authors :) echo get_avatar(get_the_author_meta('...
user avatar
0 votes
1 answer
79 views

How to change users avatar with specific e-mail addresses

My code not work :-( (numbers in e-mails 0, 1, 2, 3... 59 - these are seconds) add_filter('get_avatar', 'my_get_avatar', 10, 5); function my_get_avatar($avatar, $id_or_email, $size, $default, $alt) {...
user avatar
1 vote
1 answer
287 views

How to change avatar of the comment author using comment ID?

One visitor commented on one of my post as a guest. Now, i want to change avatar of this comment using comment ID. Comment ID of the comment is 1092. How can i change avatar of the comment using ...
user avatar
  • 13
0 votes
1 answer
155 views

Upload avatar for post comment

I have a comment form and any one can add comments without creating an account. Now client asking to allow user to upload profile picture from the comment form. Check attached image below. Any help ...
user avatar
  • 13
0 votes
1 answer
35 views

Wordpress Custom Local Avatar not showing in comments

I have built my own frontend user avatar upload script. Now the avatars show fine in the user section in admin and in the top panel. However I can't seem to get them showing in the comments and author ...
user avatar
2 votes
1 answer
244 views

Syncing Avatars across multisite

There's gotta be a way. I have tried a bunch of different multisite sync plugins and they sync users and roles just fine (even paid for plugins to do so)....but avatars don't sync. My registration ...
user avatar
0 votes
1 answer
213 views

Convert User's Avatar/Gravatar to a jpg or png on the Fly

Is there a way to convert a user's gravatar/avatar to jpg on the fly? I have the following in my function: get_avatar( $uid, 180 ); which returns the user's avatar image if I call it with straight ...
user avatar
0 votes
1 answer
25 views

Array for Wordpress Avatar Size and Class

I tried to set size and class for wordpress avatar in comments but I couldnt. <?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, array('class' => 'media-object') ); ?> ...
user avatar
0 votes
1 answer
284 views

Gender based user avatar

I'm creating a matrimonial website. I want to set the user avatar based on the gender(I have a custom_user_meta for the user's gender) But I don't understand how to get the "user id" in order to use ...
user avatar
  • 13
2 votes
2 answers
2k views

Displaying Logged-In User Name and avatar in Wordpress Menu

I want show the avatar user and username with this code. add_filter( 'wp_nav_menu_objects', 'my_dynamic_menu_items' ); function my_dynamic_menu_items( $menu_items ) { foreach ( $menu_items as $...
user avatar
1 vote
0 answers
196 views

Change wordpress default avatar with custom plugin

I've used my own custom plugin for custom functions and I'm trying to change the default WordPress avatar to my own custom avatar. My plugin name is "ACh-Toolkit". I used the following functions but ...
user avatar
  • 11
0 votes
1 answer
619 views

Change admin avatar only (without Gravatar or plugin)?

I don't like the idea of using Gravatar, and I don't want my users to be able to change their avatar. However I want to replace the avatar for the admin role only. Is it possible to do this without ...
user avatar
  • 433
0 votes
0 answers
1k views

Wordpress User profile with Avatar upload on the front end without plugin?

I want to edit the Wordpress user profile on the front end without using any plugins. I went through SO questions and found a somewhat question and found @Bainternet answer somewhat useful. How to ...
user avatar
  • 121
3 votes
1 answer
1k views

How to check if gravatar of user is the default's one?

I am looking for a way to check if the user has the default gravatar. It doesn't work if I use a simple get_avatar( current_user_id() ) === false as the default gravatar is still an avatar so it ...
user avatar
  • 549
0 votes
1 answer
64 views

Custom Field Repeating When Using foreach

I'm trying to display user avatars by login user name using custom fields like this - And here's the code - function user_avatar() { $name = get_post_meta( get_the_ID(), 'user_name', true )...
user avatar
0 votes
1 answer
536 views

get_avatar_url() how to reset the default image

I use the get_avatar_url() to retrieve the default gravatar image of an user. get_avatar_url( $user_id ); In case there is non I will provide and default using the arguments array. $arg = array ( '...
user avatar
0 votes
1 answer
39 views

Inserting PHP before a menu element, while using the inbuilt menu function wp_nav_menu()

This is tricky to word so bear with me please. I have generated a wp_nav_menu, menu-1, as the main-menu. The menu is quite complex compared to a basic b**** one. Whereby you can show and hide parts ...
user avatar
0 votes
1 answer
1k views

Buddypress update user avatar image via REST

I’m creating a custom back-end API to update a user avatar image via user id. So i send via post REST request this parameters: – user_id : The id of the user; – image: base64 image; – image_name: ...
user avatar
2 votes
2 answers
820 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 ...
user avatar
0 votes
1 answer
148 views

Wordpress get_avatar filter to match logins

There is get_avatar filter to replace avatar for user with ID 1. It works as intended. https://codex.wordpress.org/Plugin_API/Filter_Reference/get_avatar But is it possible to match avatar for every ...
user avatar
1 vote
1 answer
30 views

Displaying avatar of a user

I would like to display the avatar of a user. https://imgur.com/a/jiMn9ZD I want to do custom styling, such as the circled avatar. I have read there is code, and I am assuming this is the one I am ...
user avatar
  • 9
0 votes
1 answer
270 views

How would I be able to use a font awesome icon as a user's avatar?

Would it be possible to use/allocate a font awesome icon as a user's avatar?
user avatar
  • 976
1 vote
1 answer
344 views

Adding custom class to get_avatar() image doesn't work

Instead of outputting <img alt="" src="#" srcset="#" class="avatar avatar-60 photo" height="60" width="60"> I want to add custom class which looks like <img alt="" src="#" srcset="#" class=...
user avatar
0 votes
2 answers
2k views

Display post author avatar for Ultimate Member

I want to show avatar from the post author. I use Ultimate Members and want to show the avatars that are defined via UM. <?php global $post; $url = get_avatar_url( $post, array( 'size' => 48 ));...
user avatar
0 votes
2 answers
128 views

Return WP avatar inside a function

I am trying to override a plugin's built in avatar with the default WP avatar. The plugin's filter is this: add_filter( "idea_push_change_user_image", "idea_push_change_user_image_callback", 10, 1 ); ...
user avatar
  • 21
0 votes
1 answer
47 views

Custom Avatars for Wordpress Comments VIA Website URL?

I've tried a couple different wordpress plugins and solutions but nothing is quite what I'm looking for. I want to adjust my theme/wordpress so that avatars for my Wordpress commenters are grabbed ...
user avatar
0 votes
2 answers
398 views

Yoast SEO plugin open graph add meta tag to fetch Avatar from Author Page

I'm trying to create a new og:image for author avatar when the users sharing their author profile page to Facebook. I'm a newbie with WordPress, After searching for more than 6 months but i'm always ...
user avatar
1 vote
0 answers
28 views

Setting the profile picture from another field

I have a user registration a profile plugin where user has the ability to upload a top cover photo of their profile and hence it also has the cover photo option under the users tab in wp admin. What i ...
user avatar
2 votes
0 answers
732 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 ...
user avatar
0 votes
1 answer
1k views

User avatar-ACF fields

I'm running wp multisite and using ACF custom field (user edit) for my local avatar, in my functions.php i added : add_action('get_avatar', 'tsm_acf_profile_avatar', 10, 3); function ...
user avatar
0 votes
4 answers
931 views

How to override get_avatar() function?

I need for a specific plugin to override the wordpress function get_avatar() to bind the profile image to an other image with some condition. How can I do this ? Is there a specific hook or filter to ...
user avatar
  • 770
2 votes
1 answer
721 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 ...
user avatar
  • 33
0 votes
1 answer
132 views

Moving the WordPress dashboard avatar over the admin menu

Is there any documentation on moving the avatar image to the top of the menu area in the WordPress dashboard?
user avatar
  • 514
1 vote
1 answer
872 views

How to restore $args for get_avatar custom "class"?

I'm aware that you can pass a custom CSS class name in to an avatar using... <?php echo get_avatar( $id_or_email, $size, $default, $alt, $args ); ?> Like... get_avatar( $current_user->...
user avatar
-1 votes
1 answer
285 views

get avatar from facebook graph [closed]

I use this plugin to get fb connect wordpress.org/plugins/nextend-facebook-connect/ the problem is I need to show avatar from FB graph that stored on database. when I use this plugin wordpress.org/...
user avatar
  • 11
2 votes
5 answers
779 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 ...
user avatar
0 votes
1 answer
38 views

get_avatar() returns image with margin-bottom

Hi completely new to WordPress. I'm trying to add avatars to the page, and following the guide, I'm using get_avatar() function to achieve this. The avatar can be displayed, but I'm not sure why there ...
user avatar
  • 101
1 vote
1 answer
2k views

The "Profile Picture" section just disappeared from my User Profile

The "Profile Picture" section just disappeared from my User Profile. How do I get it back? Thanks.
user avatar
1 vote
1 answer
922 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 ...
user avatar
  • 129