Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've created a new walker class to display a custom layout when using the wp_list_comments(); function and this is perfect, the only thing is that all replies to one comment are listed in a <ul> - <ul class="children">. I would like these to be in an <ol> bracket. Is there any way to change this using something like start_lvl?

Heres my walker class - <?php wp_list_comments('type=comment&callback=letsfixit_comment'); ?>

function heres_my_comment($comment, $args, $depth) {
        $GLOBALS['comment'] = $comment;
        extract($args, EXTR_SKIP);

?>
        <li>
         <div class="oneComment" id="div-comment-<?php comment_ID() ?>">
        <div class="avatIcon pull-left">
        <?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?>
        </div>
        <span class="author"><?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?></span>
        <span class="date"><?php /* translators: 1: date, 2: time */ printf( __('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'  ','' );?></a></span>
        <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>

        <?php if ($comment->comment_approved == '0') : ?>
        <em class="comment-awaiting-moderation"><?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 ) ) ?>">

        </div>

        <?php comment_text() ?>

        <div class="reply">

        </div>
        </div>
<?php
        }
share|improve this question
2  
That is not a Walker class. It isn't a class at all. That is just the callback for displaying the individual comments. –  s_ha_dum May 13 '13 at 14:02

1 Answer 1

Add style=ol to your call to wp_list_comments.

Reference:

http://codex.wordpress.org/Function_Reference/wp_list_comments#Parameters

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.