comments show wrong (only gravatar) avatars
-
I’m designing my own first theme in WordPress and I have a small problem. I want to use totally customized comment list, so I followed the WordPress Codex, and added a function to functions.php to do just that. It is as follows:
function comment_theme($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> <div id="comment-<?php comment_ID(); ?>"> <div class="comment-author vcard"> <?php echo get_avatar($comment,$size='81',$default='<path_to_url>' ); ?> <?php printf(__('<cite class="fn">%s:</cite>'), get_comment_author_link()) ?> </div> <?php if ($comment->comment_approved == '0') : ?> <em><?php _e('Your comment is awaiting moderation.') ?></em> <br /> <?php endif; ?> <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>" class="date"> <?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div> <div class="comment-text"> <?php comment_text() ?> </div> <div class="reply"> <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </div> </div> <?php }
Everyhting seems to be quite good, but the thing is that it alwasy gives me the gravatar icon, even if i have selected some other (like mystery man) from the settings page. Can anybody help me?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘comments show wrong (only gravatar) avatars’ is closed to new replies.