wpDiscuz show a comment counter?  

  RSS

Spontis
(@spontis)
Active Member
Joined:7 months  ago
Posts: 7
13/11/2017 11:46 pm  

In my old Theme, i've coded a simple comment count to show ongoing numbering right to the comment. My Implementation via functions.php doesn't work anymore, becaus wpdiscuz display the comments in his own way.

Is there a possibility to show a ongoing comment count inside each comment? (e.g. "#1, #2, #3, ...) Here is the Code Example from my Old Comment-Template and the functions.php:

function ping_count( $count ) { 
global $id;
$comments_by_type = &separate_comments(get_comments('post_id=' . $id));
return count($comments_by_type['pings']);
}
function comment_count( $count ) {
global $id;
$comments_by_type = &separate_comments(get_comments('post_id=' . $id));
return count($comments_by_type['comment']);
}
add_filter('get_comments_number', 'comment_count', 0);

And the display that in the comment-template, located also in the functions.php:

I hope, you'll undestand my question 🙂


ReplyQuote
  
Working

Please Login or Register