The code in this download folder provides a unique way of changing the default Gravatar hosted avatar with a custom image added via the Edit Profile admin page for each user.
What’s not unique is the way the custom image is added using the Advanced Custom Fields plugin ( free or pro version ) however, the code still works when the ACF plugin is deactivated ( for images already added ) and doesn’t use any ACF specific functions.
The code also enables you to control the image ALT text, avatar-$size, width & height of the avatar. On top of this, the code enables you to completely modify the default author box added after single posts and before the author loop on the author archive page unlike other solutions which only change the default avatar image.
Note : The comment author avatars are unchanged using this code.
Demo Video
Shows you how to change the author profile image displayed on the author archive page & author box on single posts.
Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme.
Installation Steps
There’s 2 steps :
- # Copy & paste the PHP code from the functions.php file to the end of your child themes functions file.
- # Import the acf-108170.json file using the Custom Fields > Tools > Import field in your WordPress Dashboard.
Also make sure you have selected the author box on the User Profile admin page :
Leave a Reply