June 23, 2018

Adding Custom Default Gravatar

Share :

Subscribe for the latest update on our products
Blog Subscribe Form

We will never spam you. We will only send you product updates and tips.

Gravatar is used to display the user profile images in WordPress. It is the most popular medium to show a profile picture to identify oneself. Without a gravatar, WordPress uses a default image called ‘Mystery Person’.

The gravatar image will appear many times in the comment section of your post and other section by default lots of people doesn’t have their own gravatar image associated with their email address. You also can replace the default image with your own images.

To make it happen, first of all, upload the image you want to use as your gravatar image in the image library. You will have URL in the right panel, then copy the image URL.

Next, you have to add some custom code in the ‘function.php’. The following custom code is given below which has to include.

Be mindful to replace the $myavatar value with the URL of the custom gravatar image you just have uploaded. Now, you have to visit Settings >> Discussion option and you will see that your custom avatar has added as a default avatar choice.


If you haven’t subscribed to our YouTube channel, do subscribe to get WordPress-related tips and tricks. Also, follow us on Twitter and Facebook.

Sazzadul Bari
Sazzadul Bari Hi, this is Sazzadul Bari, Digital Marketing Strategist at WPManageNinja. SEO content writing, outreaching, link building, and lead generation are my specializations. And when I am not drooling over WordPress plugins and updates, you’ll find me enjoying sports or going through my favorite books.

Related Posts

  • optimum learning

    9 Key Instructional Design Principles for Optimum Learning

    February 14, 2023
  • how to add email subscription to wordpress

    How to Add Email Subscription to WordPress (4 Easy Steps)

    July 19, 2022
  • ROI of customer support

    Why Customer Support is an Investment, Not an Expense!

    July 6, 2022
Comments
  1. Marge Plasmier Avatar

    This code is gone, can you repost? Is it still valid?

Leave a Reply