Separating Trackbacks & Pingbacks in Wordpress 1.5 & Above

January 3rd, 2005 by Joen

The code presented in this article is integrated in my freely downloadable theme, “Fauna“. In this theme the whole comment aspect has been cleaned up, codewise.

This code presented below works fine for Wordpress 1.5 and above, and is derived from the “Classic” theme.

Since upgrading from Wordpress 1.2, due to the way the new version handles trackbacks and pingbacks, I could no longer separate these from comments, as I used to do.

Here’s a way to do it that works in the new system.

The Code

To show separate trackbacks and pingbacks on a page in Wordpress 1.5 or above, you can replace the code in the default [themename]/comments.php with the following:

Websites linking to this post:

  1. somefoolwitha.com » Mallow Version 1.12
  2. Standing Tall
  3. Test Track » Separated Tracks and Pings from Comments Test
  4. Definitely Maybe
  5. spiri.dk ~ XIII
  6. wp.marcosmedia » Smart Count
  7. iabadu » dimenticavo
  8. makomoo@ITP » got a trackback:)
  9. sokai.name » welcome to WP 2.0
  10. defmay :: WordPress Plugin | Smart Count
  11. kk-works.de » Kommentare von Trackbacks trennen unter Wordpress
  12. Wordpress tips and tricks » Binary Moon
  13. La domo de karotoj » Mia bloga ?isdatigo
  14. Blogging Challenge: WordPress Treasure Hunt at MaxPower
  15. Standing Tall » WP ?????????????????????

Comments (43)

  1. Joen says:

    Well, as you mention I haven't tried the plugin. However, I think i know how you can do what you want to do.

    The place where you want to write "Trackbacks (x) Comments (x)", I would guess that you're using the builtin comments_popup_link right?

    Well, don't. Instead do this:

    < a href="< ?php the_permalink() ?>#comments">Comments(< ?php smartcountfunction ?>)< /a>

    Etc. Get it?

  2. Yep, and it works perfectly! Thanks again!

  3. Nat says:

    Hello, thanks for the code. Is this the code you are still using wiht your current theme? i really like what you have going here.

  4. Joen says:

    Nat,

    The code has been optimized, cleaned up and merged with my Fauna theme. You can grab it there.

    http://www.noscope.com/fauna/

  5. Raw Carrot says:

    Thanks for the insight into how to separate the comments from the trackbacks. Very useful. Thanks again.

  6. Joen says:

    Brian (who posted here asking for email removed), while cleaning up spam i accidentally deleted yours too. Sorry about that, and sorry for all the spam you received. Somehow my countermeasures failed me.

  7. robert says:

    Is this the same plugin you have mentioned above http://defmay.com/wordpress/plugins/smart-count ?

  8. Edited to remove as the bug has been fixed. Thanks.