MyAvatars is a WordPress plugin that helps you add some spice to your blog! Commenters can now have their photos next to their names in the comments, which leads to more interest in the comments and more clicks generated from the comments alone! From the MyAvatars website:
You can now use MyAvatars, a plugin that shows MyBlogLog’s avatars in your comments instead of Gravatar’s ones even if you’re not subscribed to MyBlogLog.com.
After installing MyAvatars to your blog’s plugins folder and activating, you have to do some tweaks to your comments code. The directions from the MyAvatars website can be kind of tricky, but read it – and then I’m going to break it down for you!
Paste the code given inside the comment’s loop (just after the “foreach ($comments as $comment) :” instruction) in your comments.php file. You can style the code for a better integration using the dedicated CSS in the plugin folder.
Call the function MyAvatars with a true for Gravatar support. E.g. MyAvatars(true);
Leave blank for default settings
Got it?!?! Good!
- Be sure that you have activated the plugin by going to Plugins > Plugins on your WordPress Administration screen.
- Now go to Presentation > Theme Editor to edit your theme.
- Select comments.php in the sidebar as the file you want to edit.
- Use CTRL-F to search for foreach ($comments as $comment) :” instruction) in your comments.php file. It may be easier for you to copy and paste the italicized portion, and paste it into the FIND box.
- Once you have located this code, copy and paste
if(function_exists("MyAvatars"))into the comments.php file, as displayed in this photo illustration, right AFTER the cursor on line 60:
- Save your comments.php file, refresh your homepage and try to look at an old post with comments. You should be able to see the avatars displaying by the names of the commenters.
- If you want to further edit the display of the avatars, you must edit the plugin’s code itself, and I’ll post about that on WordPress Wednesday!
This special feature, Geek Girl, appears every Monday. Subscribe to the Geek Girl feed to get new installments in your feed reader.