customization – How do I add nopin=”nopin” to the default avatar?


I noticed that if someone clicks on my Pinterest share button on a blog post, several unrelated images show up. I was able to use nopin=”nopin” per Pinterest’s documentation on most of these images to clean most of it up.

However, I have a custom avatar set in my functions.php…

//* Add new default gravatar to Settings » Discussion page */
add_filter( 'avatar_defaults', 'wpb_new_gravatar' );
function wpb_new_gravatar ($avatar_defaults) {
$avatar_defaults[$myavatar] = "Default Gravatar";
return $avatar_defaults;

If someone gets that avatar in a comment, then the image shows up as a choice on a Pinterest share. How do I add the nopin=”nopin” attribute to this avatar image?

I found a similar post discussing this issue, but it’s way over my head and seems a little different because he’s using an array (lol, also over my head).

Any help is greatly appreciated!

Jim 10 months 2021-10-24T14:45:30-05:00 0 Answers 0 views 0

Leave an answer