Comments number without pingbacks and trackbacks
Using this snippet you can get the total comments number for a post without pingbacks and trackbacks.
Open the functions.php file that you can find into your template folder, if you haven’t it you have to create it. After this, add this code at the bottom of file:
function comment_count( $count ) {
if ( ! is_admin() ) {
global $id;
$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
return count($comments_by_type['comment']);
} else {
return $count;
}
}
add_filter('get_comments_number', 'comment_count', 0);
yihan July 16, 2010 06:53:40
thanks! worked perfectly!
Typoze September 16, 2010 02:35:38
Perfect! Thanks.
flapane October 24, 2010 21:20:50
Funziona, grazie.
Debora September 16, 2012 05:25:39
I’ve just installed this on my own blog. I’m rllaey trying to get into the whole networking thing, especially after reading the latest blog post on income.com. I’ll be contacting other blog owners in my niche to tell them about this plugin and encourage them to post on my blog.Networking will hopefully give quicker and better results than waiting for the search engines.April
Mirko | orga-dich.de December 20, 2010 07:39:00
Thanks! Works
andrei victor August 30, 2012 12:56:12
thanks for posting this. it helped me a lot!
Justyna September 14, 2012 15:29:20
Since installing the sndaatrd’ nofollow plugin, I really haven’t noticed any increase in Spam at all,In fact, what I have found since starting the blog is that it is the same old group of clowns who send this dross out, day-in, day-out, and that is still the case.if anything, I would say that the Spam count has gone down a little in the last few weeks, since I started following, but I believe that to be coincidence, rather than any connected event.Only time will tell, I guess, but I’m okay with the way things are,Steve
Lorna October 13, 2012 14:56:30
argue that PR is dead or dying. I imagine scraeh engines (Google) will modify the way they rank sites to try and correct this.What if they scored incoming and outgoing links? Say you have 1000 inbound links and 1500 outbound links. Your link score would be -500 and based on that, they reduce your rating!