Remove Gravatar and Link to Image on Server in Author Box

Community Forums Forums Design Tips and Tricks Remove Gravatar and Link to Image on Server in Author Box

This topic is: not resolved

This topic contains 7 replies, has 3 voices, and was last updated by  aureliendebord 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #75871

    AnoopSudhakaran
    Member
    Post count: 9

    Hello,

    I want to load the Author image from a directory in the server instead of calling it from Gravatar. I tried the this instructions here:

    http://my.studiopress.com/snippets/images/#custom-gravatar

    But that didn’t work.

    Also cleared cache etc.

    Can anybody help me out?

    Thanks

    http://www.hacktabs.com/opt-out-of-google-smarter-caller-id/
    #75968

    nutsandbolts
    Moderator
    Post count: 3166

    Can you paste in the exact function you used so we can take a look?


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #76141

    AnoopSudhakaran
    Member
    Post count: 9

    The code from here : http://my.studiopress.com/snippets/images/#custom-gravatar

    If you were referring to that.

    #76160

    nutsandbolts
    Moderator
    Post count: 3166

    Apologies if this is obvious, but did you change the image path in the function to match the path to your image?


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #76258

    AnoopSudhakaran
    Member
    Post count: 9

    No worries, I know its a simple step but people can miss that. But in this case I did replace it with my Author Image url. :)

    #125047

    aureliendebord
    Member
    Post count: 6

    Hello everyone,

    I am trying to display a custom avatar with the ambiance-pro theme.
    I have pasted the snippet in the function file of my theme, changed the path, but nothing has changed.

    My image is in the right folder (“/images” in the theme folder).

    Anyone has a clue ?


    Aurélien Debord, building websites in France.

    #125063

    nutsandbolts
    Moderator
    Post count: 3166

    I had to change the snippet to use the full url instead, as I noticed that the partial URL stopped working:

    //* Display a custom Gravatar
    add_filter( 'avatar_defaults', 'nabm_gravatar' );
    function nabm_gravatar ($avatar) {
    	$custom_avatar = 'https://static.nutsandboltsmedia.com/wp-content/uploads/2014/09/nabm-avatar.png';
    	$avatar[$custom_avatar] = "NABM Gravatar";
    	return $avatar;
    }

    Once I did that, it started working again. Be sure to go to Settings > Discussion to select the new one and save. HTH!


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #125077

    aureliendebord
    Member
    Post count: 6

    Thanks Andrea, it works perfectly :)


    Aurélien Debord, building websites in France.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.