The code in this template displays the author avatar only if they have a valid Gravatar hosted image otherwise, nothing.
Demo Video
Shows the author Gravatar displaying when using a valid Gravatar.com email address. For authors without a valid Gravatar email address, no image is displayed.
Tested using the Twenty Twenty default theme for WordPress, will work in most WordPress themes without modification.
Installation Steps
There’s 3 steps :
- # Copy & paste the PHP code from the functions.php file to the end of your child themes functions file.
- # Upload the custom author.php template to your child theme folder like this :
- # Copy & paste the CSS from the style.css file to the end of your child themes style sheet and clear caching.
Leave a Reply