To fix that, you need to insert in your functions.php file the following code (if you don’t find this file in your template folder, then create it):
[code='php']
add_filter('get_comments_number', 'comment_count', 0);
function comment_count( $count ) {
global $id;
$comments = get_approved_comments($id);
$comment_count = 0;
foreach($comments as $comment){
if($comment->comment_type == ""){
$comment_count++;
}
}
return $comment_count;
}
[/code]
Test your website. If the comments number is decreased, is ok. Check that the comments are counted correct. Now, open your wordpress admin panel and try to write a new post (“add new post” form) and write something for test waiting after the saving of draft (you can see the status on the bottom right of your text editor).
If there appear an warning message like “Warning: Cannot modify header information – headers already sent by (output started at…etc” it is usually because there are spaces, new lines, or other garbage before an opening tag in your function file. Don’t panic. Open the file in a classic text editor like notepad and delete the spaces and check that the very last characters are ?> and the very first characters are <?php.
Then, if you would like to separate the WordPress comments and trackbacks in two fields, read this tutorial.








Tweets that mention How to not count number of trackbacks in the comments number | reADactor -- Topsy.com
How to not count number of trackbacks in the comments number | reADactor
vector spaces