コード内容：コメント出力コード例
コードの記述先：comments.php
-------------------------------------------------------
<?php wp_list_comments( array( 'type' => 'comment', 'callback' => 'callback_comment' ) ); ?>
-------------------------------------------------------


コード内容：コメント出力コードのコールバック関数の例
コードの記述先：functions.php
-------------------------------------------------------
<?php
function callback_comment( $comment, $args, $depth ) {
    $GLOBALS['comment'] = $comment;
?>
    <li <?php comment_class(); ?> id="li-comment-<?phpcomment_ID(); ?>">
        <div id="comment-<?php comment_ID(); ?>">
            <div class="comment-author vcard">
                <?php echo get_avatar( $comment, 40 ); ?>
                <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
            </div><!-- .comment-author .vcard -->
            <?php if ( $comment->comment_approved == '0' ) : ?>
                <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
                <br />
            <?php endif; ?>
            <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
                <?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a>
                <?php edit_comment_link( _ _( '(Edit)', 'twentyten' ), ' ' ); ?>
            </div>
            <div class="comment-body"><?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
}
?>