Top

Daily Tip: Display Avatars For Logged In Users to Encourage Commenting

April 15, 2010

Paste this snippet anywhere in your theme’s template files to display the avatar of a logged-in user. I think it works well to put just above the comment form in your single.php file so that the user sees his photo above the comment form, encouraging him to have something to say. Check out the screenshot below of this snippet in action.

Here’s the code:

<?php
    global $current_user;

        get_currentuserinfo();
        echo get_avatar( $current_user->ID, 128 );
 ?>

Source: aext.net

Tweet This Post

Comments

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.