Posted By

bitsculptor on 06/20/12


Tagged

wordpress Gravatar


Versions (?)

Wordpress gravitar addons


 / Published in: PHP
 

URL: http://buildinternet.com/2009/02/how-to-change-the-default-gravatar-in-wordpress/

this is an easy function to add a gravitar to wordpress.

  1. add_filter( 'avatar_defaults', 'newgravatar' );
  2.  
  3. function newgravatar ($avatar_defaults) {
  4. $myavatar = get_bloginfo('template_directory') . '/images/buildinternet-gravatar.jpg';
  5. $avatar_defaults[$myavatar] = "Build Internet";
  6. return $avatar_defaults;
  7. }

Report this snippet  

You need to login to post a comment.