WP SITES

3095 Coded Tutorials & 297 Plugins

Show Gravatar On Author Archive If It Exists In Twenty Twenty

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 :

  1. # Copy & paste the PHP code from the functions.php file to the end of your child themes functions file.
  2.  

  3. # Upload the custom author.php template to your child theme folder like this :
  4.  

  5. # Copy & paste the CSS from the style.css file to the end of your child themes style sheet and clear caching.
  6.  

Download Folder

Related Tutorials

Was this helpful?

Yes
No
Thanks for your feedback!

Leave a Reply