/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
------------------------------- Comments.php ------------------------------- <ul class="commentlist"> <?php wp_list_comments('type=comment&callback=mytheme_comment'); ?> </ul> ------------------------------- Functions.php ------------------------------- <?php function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> <div id="comment-<?php comment_ID(); ?>"> <?php if ($comment->comment_approved == '0') : ?> <?php _e('Your comment is awaiting moderation.') ?><br /><br /> <?php endif; ?> <?php comment_text() ?> <div class="reply"> <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </div> </div> <?php } ?>