Trackbacks and pingbacks in recent comments
-
Hi,
I’m using the recent comments widget on my site and I have some code for getting rid of trackbacks and pingbacks from it. Until recently this has worked fine.
This is the code I use:
//remove pingbacks and trackbacks from recent comments if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) { $comments = $wpdb->get_results("SELECT $wpdb->comments.* FROM $wpdb->comments JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_status = 'publish' AND comment_type IN ('comment', '') ORDER BY comment_date_gmt DESC LIMIT 15"); wp_cache_add( 'recent_comments', $comments, 'widget' ); }
Any ideas why it isn’t working any more?
/Calle
- The topic ‘Trackbacks and pingbacks in recent comments’ is closed to new replies.