• Hi everybody!

    I have at https://www.tvblogger.de on the left side a list of the recent comments. when i have a trackback in one of my posts, it is shown everywhere as a comment.

    how can i seperate the trackbacks from the comments? is there a possibility in wp 1.5 for something like that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you using a plugin to retrieve the latest comments? If so, you’d have to probably modify the SQL query it’s using to get the information.

    One of the entries in the ‘wp_comments’ table is ‘comment_type’. It can either be ‘comment’, ‘trackback’, or ‘pingback’.

    The SQL query should be changed to just return entries that are of type comment, of course. ??

    Regards

    Joen wrote a little guide on seperating Track/Pingbacks for your comments page. Perhaps the same method can be applied to the recent comments plugin (or whatever you are using to display them).

    Here is the link to the guide.

    What I did was go through different themes and found one that separated the trackback from the comments, and then figured out how they did it and hacked the code from that theme to my theme. I don’t exactly remember how I did it, but I think it is in the comments.php. I looked at it a moment ago, but I am not able to confidently tell you what it is that I did. Looks like I duplicated the section where it listed the comments, and then put in a conditional statement that goes something like:

    <? if ($comment->comment_type == “trackback” || $comment->comment_type == “pingback” || ereg(“<pingback />”, $comment->comment_content) || ereg(“<trackback />”, $comment->comment_content)) { ?>

    And then included the other functions to list the trackbacks by themselves. I also then hacked in the nice features of alternatively displaying different backgrounds for the posts.

    I remember it took me only about half an hour to do that which is good, and I didn’t break anything. ?? Hope that helped… Others more knowledgeable might chime in with more precise help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘seperating trackbacks?’ is closed to new replies.