WordPress.org

Codex

Template Tags/get comment author email

get_comment_author_email() function returns the comment author's email rather than echo it.

Example usage:

<?php if($comments) : ?>

    <?php foreach($comments as $comment) : ?> <li id="comment-<?php comment_ID(); ?>"> <?php if ($comment->comment_approved == '0') : ?>

    Your comment is awaiting approval

               <?php endif; ?>  
               <?php comment_text(); ?>
               <?php echo get_avatar(get_comment_author_email(), $size, $default_avatar ); ?>   
               
                   <?php comment_type(); ?> by 
                   <?php comment_author_link(); ?> on 
                   <?php comment_date(); ?> at 
                   <?php comment_time(); ?>
                 
    
       <?php endforeach; ?>  
    

<?php else : ?>

No comments yet

<?php endif; ?>

This page is marked as incomplete. You can help Codex by expanding it.