Change the Default Gravatar in WordPress

| Last Updated: | In: WordPress Snippets


By default, WordPress comes with some basic default user avatar is named “Mystery Person”. In this tutorial, I will explain how to change the default gravatar in WordPress.

If you want to add your brand to default user gravatar for the newly registered user in your website, then keep your close your attention in this post.

Change the Default Gravatar in WordPress

use the below code at the end of your functions.php file. functions.php file is located in wp-content/themes/your-theme-folder/functions.php.. Change the Image path in this line of code $myavatar = 'https://www.freewebmentor.com/default-avatar.png';

After adding the above code login to your WordPress admin panel and navigate to the Settings => Discussion Settings. At the end of this page, you will see a default avatr has been added. see the screenshort.


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:

Tags: , , , , , ,