Wordpress Change default Gravatar


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



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/gravatar.gif';
  5. $avatar_defaults[$myavatar] = "WPBeginner";
  6. return $avatar_defaults;
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.