Skip to content

bm trackPing – comments, trackbacks and pingbacks separated

A year and a bit ago I wrote a tutorial on splitting the comments, trackbacks and pingbacks up on your wordpress blogs. Then a few months ago Daniel from DailyBlogtips wrote a post on the same subject (a couple people even mentioned my post in the comments :) ). I decided then a plugin was needed to do this.

The basics were easy but I was having issues calling the splitter function without user intervention, I like to make things as simple as possible and it just wasn’t working for me. Then, a couple of weeks ago, this post on weblogtoolscollection talked about a similar topic and I noticed the comments_array plugin hook, a hook I hadn’t seen before.

Once I knew what to do it only took me 5 minutes to put it all together (it’s easy when you know how) and I now have a finished working plugin. BM-trackPing.

The plugin is very easy to use, simply upload the plugin file, and activate it. Done.

What it does is grab all the trackbacks and pingbacks and add them to an unordered list in a brand new comment, removing the old comments along the way. This all happens at display time and modifies nothing in the database, meaning the site will work as normal if you disable the plugin.

The plugin also sets the comment type to bm-trackback which means that if you use the BM-comment-highlight plugin, you can target the comment class to style it differently as well. I use a variant of bm-trackPing over on Pro Theme Design and it seems to work a treat.

Share

8 Comments »

  1. I’ve been using this method for ages and I kind of enjoy having it in the functions file. I’ll check out the plugin because this is something I use for every site I make. Just a better way of showing the information the user wants to see, IMO.

    Me and a client were formulating having them in tabs (with other stuff) after seeing it on Smashing Magazine, but the idea is going to get far less original now! That’s a good thing I guess.

  2. Jim – thanks. Glad you like it.

    I very much doubt it will work with the paged comments plugin since that hacks around with the comment display an awful lot.

  3. Hello Ben,
    Thank you for this great plugin, it really cleans up the comments.
    May I ask how to edit the line so the link in the trackback is marked with a rel=”nofollow” tag?
    I always mess up with parsing errors (^^)

  4. Hey Igor – you should be able to add nofollow quite easily. Just go to line 23 and add

    rel=\”nofollow\”

    within the link area.

  5. Brilliant, works like a charm, thanks Ben!
    So, if anyone needs it, the line looks like this:
    $trackPingContent .= “<a href=\”" . comment_author_url . “\” rel=\”nofollow\”>” . $comment->comment_author ….</a>

  6. Any chance you could show us how to put trackbacks in a a separate tab a la smashing and your mimbo pro theme?

    Love the plugin, thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

I seem to find myself working with Youtubes thumbnail images quite a lot (for instance on Miniclips videos section) – and I am always having to go searching for the parameters to use to generate those thumbnail images. So I […]