There's nothing more annoying than pingbacks displaying in the WordPress Recent Comments Widget. This week I set out on a quest to discover how to remove them from the widget. I'd already discovered how to have them not display on the comments page, but the widget is different altogether and the fix is so simple that I could kick myself. The sourcecode for the recent comments widget can be found in the wp-includes/default-widgets.php file. Search for the line that says:
and change it to
That's all it takes to filter the pingbacks out. Of course, you really don't want to mess around with the default WordPress widgets. Any WordPress update will overwrite your changes. What I did was copy the default Recent Comments source code and added to the bottom of my theme's functions.php. The new code is below. It has been modified so it does not conflict with the default widget.