Disable and Remove gravatar in comments and leave author image

Posted in: Newspaper
Post count: 11

Hi,
I currently have author avatar in the author box and comments avatars showing.

I would like to turn off comment avatars (from WP admin panel) without losing the author avatars. I had contacted WordPress.org support but I was told I should contact my theme providers, I really would like to actually stop the comment avatars loading into the DOM.

Any ideas?
Thanks

Post count: 35449

Hi,

Unfortunately if the author avatar is remove this will be remove from everywhere, the only option will be to remove the avatar from theme files, but this is not indicate because the changes will be lost when you’ll update the theme.

Thank you!

Post count: 11

Don’t worry I will create a child themes, can you guide me through removing the codes that displays gravatar in comments?

Post count: 35449

Hi,

I do not this that you can set it in a child theme, because the comments are not from theme is using the comments from WordPress, is call the comment-template.php from-> wp-includes/comment-template.php -> https://i.imgur.com/EEaU3bb.png

Thank you!

Post count: 11

So how do I disable the gravatars from displaying there

Post count: 35449

Hi,

Th WordPress has an option, that is removing the avatar from everywhere -> https://i.imgur.com/lUjZrF6.png also you can use custom css, but this will only remove the element visual, this will be still loading in backend.
The file responsible for comments on cloud templates is this one -> wp-content/plugins/td-cloud-library/shortcodes/single/tdb_single_comments.php

Thank you!

Post count: 11

I understand you i have disabled it using the WordPress option but my author image is not showing any help?

Post count: 35449

Hi,

As I said above, that is a general option, will remove the avatar from everywhere in theme and WordPress.

In order to help you I made a function that detects the avatar from comments and is stop it to be load, also this function can be set in functions.php in child theme, you can get it from here -> https://pastebin.com/XhPuW8ZE

Hope this will help you!
Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.