Getting comment count to work on new WordPress 3.0 theme loop setup

Anyone get this to work at all? In the new theme, comments are populated using wp_list_comments( array( ‘callback’ => ‘theme_comment’ ) );

and I have no idea where this is looping, so I don’t know where to start counting a new variable. I can alter the layout of the comments in functions.php, but it’s just a function and apparently wordpress is somehow using it only once to populate multiple comments.

Related posts

Leave a Reply

1 comment

  1. If you just want the comment count, why not get_comments_number()?

    UPDATE:

    function my_comment($comment, $args, $depth)
    {
        static $count = 1;
    
        // do your comment output - $count will increase on each iteration
    
        // you could copy and paste twentyten's comment callback code here
    
        $count++;
    }
    
    wp_list_comments('callback=my_comment');