show author avatar

I have modified the loop.php file to add some comment stuff in. I wanted to show a comment off a link which is working just fine. Now I went to make that comment show more detail by putting the author avatar. So my code looks like this. It does display the default avatar but is … Read more

remove_filter( ‘comment_author’, ‘floated_admin_avatar’ ); doesn’t work

In a small plugin I’ve written to add an IP address column to the comments list I want to remove the avatars. In line 156 I tried to use remove_filter: remove_filter( ‘comment_author’, ‘floated_admin_avatar’, 50 ); Well … I know this function fails sometimes, but why does it fail here? My workaround is: $_GET[‘comment_status’] == ‘spam’ … Read more

get the avatar url instead of an html img tag when using get_avatar?

i want to get the user avatar URL to use it as background URL style for a div. i tried to use the following but it does not return anything when i view the code it appears like that. background: url() i used this function. function get_avatar_url($get_avatar){ preg_match(“/src=”https://wordpress.stackexchange.com/questions/63198/(.*?)”/i”, $get_avatar, $matches); return $matches[1]; } any help … Read more

How to make gravatar.com avatars conditional?

Problem: I am using custom avatars for registered users and my own locally-hosted image as the default gravatar. I want to stop WordPress making HTTP requests to check for gravatar.com images on every comment. Where my custom avatars are used, the scr result still includes a hashed link to gravatar.com with a redirect appended to … Read more

How to get gravatar url alone

I would like to use gravatar image as background image for a button. When i use get_avatar function it returns with height width src parameters. But i need only gravatar url. I mean like http://gravatar.com/…/… Can anyone tell me how? Thanks 2 Answers 2 Just generate the URL yourself. It’s just a hash of the … Read more