• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Riot Customs

Riot Customs

Genesis WordPress Development, Maintenance & Support

  • About
  • Services
  • Blog
  • Shop
  • Contact

Create a Custom Default Avatar

Written by Katrina

8 shares
  • Facebook2
  • Twitter
  • LinkedIn
  • Tumblr
  • Buffer
  • Email


What is a default Gravatar?
Gravatar stands for Globally Recognized Avatar. It is globally recognized because millions of websites use them. It’s the most popular application and platforms like WordPress have built-in support for Gravatar. When a user leaves a comment (with their email address) on a site that supports Gravatar, it pulls their Globally Recognized Avatar from Gravatar servers. Then that picture is displayed next to the comment. This allows each commenter to have their identity throughout the internet.


But you wouldn’t want just a simple ghost showing up in your comments right?

First, you’ll need to create a graphic that will be intended as the default Gravatar. On this site we use

I would recommend using the size 96×96 when creating this (you should also name it avatar.png).

Once you have this saved somewhere on your computer you’ll need to upload (FTP) it to your theme in the image folder.

Now head over the to the functions.php file and add this code below.


//* Create a custom Gravatar
add_filter( 'avatar_defaults', 'riot_custom_gravatar' );
function riot_custom_gravatar ($avatar) {
	$custom_avatar = get_stylesheet_directory_uri() . '/images/avatar.png';
	$avatar[$custom_avatar] = "Custom Gravatar";
	return $avatar;
}

Don’t forget to save your work.


From your Dashboard, you’ll need to click on Settings > Discussion
Select your Custom Avatar and hit save.


Now everyone who comments that doesn’t have a Gravatar attached to their email address will now show up as the photo you uploaded.


 Add a Gravatar to your email address

Previous Post
Next Post
8 shares
  • Facebook2
  • Twitter
  • LinkedIn
  • Tumblr
  • Buffer
  • Email

Tutorials, WordPress Leave a Comment

Reader Interactions

Share Your Thoughts
Cancel reply

Your email address will not be published. Required fields are marked *

I accept the Privacy Policy

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Maven Theme

Maven Lite

A single page theme using Kadence. A great theme for a simple site to showcase your skills. Grab this free theme today!

Download Now!

Categories

  • Blogging
  • Business
  • Client Work
  • ConvertKit
  • Freebie
  • GenesisWP
  • Interact
  • Personal
  • Theme Releases
  • Theme Updates
  • Tools & Software
  • Tutorials
  • Web Design
  • WordPress

Master ConvertKit

A kick ass tech course on using the ConvertKit software. Want to start growing your list with the best email marketing software out there? What are you waiting for? Grab this course now!

Enroll Now!

Popular Post

change domains dns

How To Change Your Domains DNS

4 Steps to DIY Your Way to A Professional Looking Website

About Lead Your Page + Giveaway

How to Use the Landing Page Template

Buy me a coffee
Newsletter

Tails from the Beast

Join our newsletter for tips on how to use the WordPress platforms. Advance your skills, and most importantly, puppy photos.

Please enter your name.
Please enter a valid email address.
Sign Me Up!

Thanks for subscribing! Please check your email for further instructions.

Something went wrong. Please check your entries and try again.

Development Information

  • How it Works
  • Trusted Partners
  • Portfolio
  • Client Portal

Explore

  • Resources
  • Terms of Service
  • Privacy Policy
  • Disclamier

© 2009 - 2023 Riot Customs, LLC.

Powered by Flywheel & Beaver Builder.