As a sequal to the debut entry of the “WordPress 1 Minute Wonder” series which talked about styling author comments differently to other comments this post extends the usefulness of your comments by adding Gravatar Hovercards to you site/blog. This posts presumes that you know what Gravtars are (if not check them out).
Again, in true WordPress 1 Minute Wonder fashion this is a dead simple thing to enable and involves nothing more than copy and paste and (s)FTP access to your site. In fact before I show you the steps I should credit the guys at WebBlogToolsCollection for this… in this case I simply a messenger.
So to get this working simply copy and paste the following code into your theme’s function.php file (create one if it doesn’t exist).
wp_enqueue_script( 'gprofiles', 'http://s.gravatar.com/js/gprofiles.js', array( 'jquery' ), 'e', true );
This should give your comments’ avatars a nice hovercard affect if you hover over them.
It’s that simple and useful… brilliant.
To get the most out of this feature (on your site and on others that you comment on) make sure you update the info on your Gravatar profile.
[jbox color=”blue” vgradient=”#fdfeff|#bae3ff” title=”Found this useful?”]If you’ve used this tip and now have Gravatar hovercards working on your WordPress powered website or blog why not subscribe to my feed or check out the first item in the WordPress 1 Minute Wonder series?[/jbox]