Change the default Mystery Man Avatar


/ Published in: HTML
Save to your folder(s)

Change the name of the image file from "/labrats-gravatar.jpg" to whatever you want to call the image you upload. Be sure that it is sized to 128x128px and is a .jpg format. Be sure to upload this image file to your theme directory in the "images" folder.

If you want, you can change the description text "LabSecrets - Booyah!" below as well.


Copy this code and paste it in your HTML
  1. add_filter( 'avatar_defaults', 'newgravatar' );
  2.  
  3. function newgravatar ($avatar_defaults) {
  4. $myavatar = get_bloginfo('template_directory') . '/images/labrats-gravatar.jpg';
  5. $avatar_defaults[$myavatar] = "LabSecrets - Booyah!";
  6. return $avatar_defaults;
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.