Ping/Track/Comment Count
About
This plugin, co-created by Chris J. Davis, Scott Merrill, and Mark Jaquith in one magical rainbow-filled night contains two functions that return and echo the number of pingbacks, trackbacks, combined pings or regular comments for a WordPress entry.
This is of particular use to people who want to separate their regular comments from their pings. The plugin is “smart” and will grab all the numbers in one go the first time you call it, so that subsequent calls use no database queries, making it very efficient.
Download
Usage
There are two functions you can use: get_comment_type_count() (which returns the value) and comment_type_count() (which echoes the value).
Both functions operate identically, and take 2 optional parameters. The first parameter is the type of comment you would like returned (defaults to ‘all’). Your options are trackback, pingback, ping, and comment.
For example, pretend that a post has 1 pingback, 2 trackbacks, and 4 regular comments.
<?php
comment_type_count('pingback'); // prints "1"
comment_type_count('trackback'); // prints "2"
comment_type_count('ping'); // prints "3" (1 pingback + 2 trackbacks)
comment_type_count('comment'); // prints "4"
comment_type_count(); // prints "7" (1 pingback + 2 trackbacks + 4 comments)
?>
The second parameter, which is also optional, is a post ID. By default, the function just gives you the number for the current post being processed in “the loop.” By passing a specific post ID, you can get the count for any post ID you wish.
<?php
comment_type_count('pingback', 534); // prints number of pingbacks on entry 534
?>


Source Code couldn’t be displayed.
Micha, just moved to a new server. Thanks for pointing that out. I’ll try and get that fixed.
Alright, it should be fixed now!
It is fixed.
[...] skippy Member Chris Davis’ separation anxiety is a good one. Also look at Mark Jaquith’s ping/track count. Posted: 2005-08-27 01:51:07 # [...]
When I added the code to my post.php file, it limited my index to one post per page. Is there a way to solve this? This seems to be the only working plugin to so all of this, right now.
Did you get an error? The only reason I can think that it would limit it to one post is if there was an error and it stopped outputting the page after that. Let me know what the error was and I’ll look into it.
No, unfortunately, there was no error outputted
You sure? You viewed the source of the page and looked at the place where the function is called and there was no error?
No error at all. There’s not even a whitespace in the source where the function is being called.
Hi, does this mean that I can count the number of trackbacks, and comments on another blog?
John
Hi, sorry I understand your plugin is for the an individual blog, my real question is this, how would I count comments or trackbacks on another blog without having to do it manually?
You can’t. You’d need access to their database.
Hi, I am having problem with this great plugin. When I activate it in my WP2.0 plugin page, the following message shown above my admin page header after the plugin page is reloaded:
And it makes one of my plugin, the LiveCalendar not working. Everything back to normal when “Ping/Track/Comment Count” is disabled. May I know if there is anything I can modify in my blog to solve the conflict? (Except disabling LiveCalendar)
Thank you.
You must have an extra space after the closing
?>in the plugin … make sure there is no space after that.Yeah~! It’s fixed, thanks~!!
Thanks Mark, makes sense.
[...] No jako¶ nie mogê nic znale¼æ :/EDIT:jest wtyczka: http://txfx.net/code/wordpress/ping-track-comment-count/ Ten post by³ edytowany przez Fanatyk: Dzisiaj, 14:47 ——————– # Znikaj±ce posty i inne k³opoty "z forum" # [forum Gaduly.com] # Tani Profesjonalny Hosting [...]
just wondering where to put this code. as i can’t find the post.php file
Within the WordPress loop would be the best location.
[...] [...]
[...] Probably because there’s an old age rule in the world of WordPress, from what I have seen… “If you thought it up, chances are there’s a plugin for it.” There’s a plugin on tempus fugit that does what you are requesting. When in doubt, search the WordPress codex plugin list as well as wp-plugins.net. If you can’t find what you are looking for, even after a google search, then it’s safe to assume that there’s no plugin for what you want. In that case, posting in a forum would be your best bet, seeing if other people like that idea, then the coders come in, and you probably know the rest. ^_~ [...]
Thanks, that’s exactly what I was looking for! In fact there’s quite a lot of stuff you’ve got here that I’d like to ‘borrow’; could you please point me towards the plugin/tag/whatever for the Blog Author/Subscribed buttons you’re using? Thanks again.
Seems that it doesn’t work with Wordpress 2.0.3. I get an error about already send headers everytime I try to save a document and the default WYSIWYG Editor is gone.
I always get the following error message after activating this plugin:
Warning: Cannot modify header information – headers already sent by (output started at wp-content/plugins/count_trackbacks.php:64) in wp-includes/pluggable-functions.php on line 272
Does somebody know it? Or better does somebody know how to fix it?
Nice…
[...] http://txfx.net/…mment-count/
[...]
This is free sites. Thank you!
food allergy food intolerance
Hi,
[quote]When I added the code to my post.php file, it limited my index to one post per page. Is there a way to solve this? This seems to be the only working plugin to so all of this, right now.[/quote]
I am getting the same thing!
No errors of any kind either.
Also, for your example how can I make it output:
1 pingback
2 trackbacks
3 pings
4 comments
Take Care,
Will
mini motorcyclevintage motorcyclemotorcycle seatmotorcycle salvage yardmotorcycle trike
Hi My Name Is ivatut.
Your site is perfect!
Nice! I’ll definately check back here!
I can do a blog on your website? how much it will cost?
[...] una etiqueta <!–more–> para cortar el texto. Los otros plugins instalados son Ping/Track/Comment Count con tal de separar los comentarios de los trackbacks, Related Posts para mostrar entradas [...]
[...] Visit [...]
I have visited your site 116-times
I could not find this site in the Search Engines index
I thought that the WTO would be a good start for transforming the process of government at least across national borders. I quite like the idea of using the secretariat of the WTO as the centre for a Wikipedia of trade – a sort of open source world government at least for a very specific and complicated issue which needs many brains to provide a solution.
Hello, very nice site, keep up good job!
Admin good, very good.
hi, thanks for the code, very handy to help me separate my pings and comments.
[...] Ping/Track/Comment CountCode » Wordpress » Ping Track Comment Count [...]
list of the posts with the most comments. Modified for Last X days … by DJ Chuang. Author: Nick Momrik Nicer trackbacks Changes the display of trackbacks from [...] Tracbackback text [...] to something a little more readable. Author: Rachel CunliffePing/Track/Comment CountFunctions that return or display the number of trackbacks, pingbacks, comments or combined pings recieved by a given post. Author: Mark Jaquith Maintenance Mode Plugin Adds a splash page to your blog that lets visitors know your blog is down for
http://groups.msn.co
list of the posts with the most comments. Modified for Last X days … by DJ Chuang. Author: Nick Momrik Nicer trackbacks Changes the display of trackbacks from [...] Tracbackback text [...] to something a little more readable. Author: Rachel CunliffePing/Track/Comment CountFunctions that return or display the number of trackbacks, pingbacks, comments or combined pings recieved by a given post. Author: Mark Jaquith Maintenance Mode Plugin Adds a splash page to your blog that lets visitors know your blog is down for
[...] Kita juga bisa untuk membuat judul bagian Pingback/Trackback tidak muncul jika tidak ada satupun Pingback/Trackback yang masuk untuk artikel tersebut, tapi untuk melakukan hal ini, kita harus menginstall plugin tambahan yang bernama Ping/Track/Comment Count. [...]
[...] is an impressive light weight plugin: Ping/Track/Comment Count by Mark Jaquith which calculates the total number of comments, pingbacks and trackbacks through the [...]
[...] Untuk melakukan hal itu, kita harus menginstall plugin tambahan yang bernama Ping/Track/Comment Count. [...]
[...] Ping/Track/Comment Count – So I can separate comments from trackbacks from pings [...]
[...] Ping/Track/Comment Count – Find out the total number of pings, trackbacks, and comments [...]
[...] Ping/Track/Comment Count – Counts the comments seperately from the pings. Recommended for correct function of this theme [...]
I think there’s one option that’s missing in this plugin, and that is the ability to show only actual comments with the pings filtered out. It would be nice if that option could be added.
Like this:
pingback – show only pingbacks
trackback – show only trackbacks
ping – show pingbacks + trackbacks
onlycomment – show only comments
comment – show comments + pingbacks + trackbacks
Michael, That’s what passing ‘comment’ does. Passing nothing gives you everything. Passing ‘comment’ gives you only comments.
[...] /* Plugin Name: Ping/Track/Comment Count Plugin URI: http://txfx.net/code/wordpress/ping-track-comment-count/ Version: 1.1 Description: Provides unctions that return or display the number of trackbacks, [...]
I was searching for very similar plug-in. I will check it if it fits me, thnx.
[...] Ping Track Comment Count Tempus Fugit by Mark Jaquith Posted by root 1 hour 59 minutes ago (http://txfx.net) Los otros plugins instalados son ping track comment count con tal de separar los author rachel cunliffeping track comment countfunctions that return or display the mike davidson mike industries now powered by wordpress says Discuss | Bury | News | Ping Track Comment Count Tempus Fugit by Mark Jaquith [...]
[...] Ping Track Comment Count Tempus Fugit by Mark Jaquith Posted by root 17 minutes ago (http://txfx.net) Take care will motorcycle online says mar 14th 2007 at 2 07 pm los otros plugins instalados son ping track comment count con tal de separar los comentarios de mike davidson mike industries now powered by wordpress says Discuss | Bury | News | Ping Track Comment Count Tempus Fugit by Mark Jaquith [...]
[...] Ping Track Comment Count Tempus Fugit by Mark Jaquith Posted by root 18 minutes ago (http://txfx.net) Take care will motorcycle online says mar 14th 2007 at 2 07 pm los otros plugins instalados son ping track comment count con tal de separar los comentarios de mike davidson mike industries now powered by wordpress says Discuss | Bury | News | Ping Track Comment Count Tempus Fugit by Mark Jaquith [...]
[...] Ping Track Comment Count Tempus Fugit by Mark Jaquith Posted by root 1 hour 1 minute ago (http://txfx.net) In fact there quite a lot of stuff you 39 ve got here that i 39 d like to 39 borrow 39 wordpress plugins database plugin details ping track comment count says a very specific and complicated issue which needs many brains to provide a solution mike davidso Discuss | Bury | News | Ping Track Comment Count Tempus Fugit by Mark Jaquith [...]
[...] Ping Track Comment Count Tempus Fugit by Mark Jaquith Posted by root 4 minutes ago (http://txfx.net) Mike davidson mike industries now powered by wordpress says ping track comment count tempus fugit by mark jaquith wood tv stand says Discuss | Bury | News | Ping Track Comment Count Tempus Fugit by Mark Jaquith [...]
Oh my! Thanks a lot. I thought I would have a hard time in finding a solution to my problem. Thanks again. You really helped.
ar
Thank you,
very interesting article
Online forums
Thank you,
very interesting article