• I’ve been trying to figure out how I can distinguish pingbacks/trackbacks so that they look different from regular comments. I’ve tried the suggestions found at: https://www.cre8d-design.com but the “tutorial” wasn’t very intuitive and I kept getting PHP errors whenever I tried to implement the code. I think the best approach for me is to place an icon next to the pingback author that simply says “PINGBACK” or trackback in order to alert the user that he’s reading a pingback comment, like I’ve some WordPress blogs do. I’d also like for it to include a clean direct link back to where the pingback/trackback originated. For the life of me, I donot understand why WordPress doesn’t do this automatically.

    Note I don’t want to separate the pingbacks from comments, just make them look different.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Delete Me

    (@lincolnadams)

    Update: this site provided a pretty decent solution:

    https://www.tamba2.org.uk/wordpress/commentstyling/

    There’s one additional change I’d like to make: instead of the annoying […] tags that wrap a pingback, I’d like to replace that with a title indicating that the comment is a pingback and a “read more” link at the end. Is there code somewhere out there that i can look at and duplicate on my own site?

    Thread Starter Delete Me

    (@lincolnadams)

    Nobody huh? ??

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Trackbacks: Look closely at the wp-trackbacks.php file. Making that do whatever you want should be fairly obvious.

    Pingbacks: Look down around line 1200 or so of the xmlrpc.php file. That’s where pingbacks get handled, and the […] things get added as well.

    As far as styling goes, just add some code to your comments loop that looks at $comment->comment_type. It’ll be either ‘pingback’ or ‘trackback’ for those two, so all you have to do is to use that to add a class to the surrounding div (or whatever) of each comment, then add some style info for that class to your CSS. Easy.

    Thread Starter Delete Me

    (@lincolnadams)

    Thanks for the suggestions, I appreciate it! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Styling Pingbacks/Trackbacks’ is closed to new replies.