Oct 29, 2025 12:11 pm
After I updated my WP and WP Discuz to the latest versions (as per today oct, 29th 2025), I noticed that the IP addresses of comments are missing. Up until yesterday the IP addresses were visible, but now they're gone. Any idea what happened and how to get the IP's back? I use them to filter out trolls.
2 Replies
Oct 29, 2025 12:55 pm
Aaargh, it's enforced 'privacy' in WP core. That makes me sick. I MUST know and identify trolls.
FIX it by adding this to your theme's functions.php file. It will ADD a column with the IP.:
// 1. Add the column header
add_filter( 'manage_edit-comments_columns', function( $columns ) {
// Insert right after the "Author" column
$new = array();
foreach ( $columns as $key => $title ) {
$new[ $key ] = $title;
if ( 'author' === $key ) {
$new['comment_ip'] = 'IP Address';
}
}
return $new;
} );
// 2. Fill the column
add_action( 'manage_comments_custom_column', function( $column, $comment_id ) {
if ( 'comment_ip' !== $column ) {
return;
}
$comment = get_comment( $comment_id );
$ip = $comment->comment_author_IP ?? '';
echo $ip ? esc_html( $ip ) : '<span style="color:#aaa;">—</span>';
}, 10, 2 );
Oct 30, 2025 9:58 am
Thank you for letting us know. Glad to hear that the issue is solved.
We're going to mark this thread as resolved. Feel free to open a new topic if you have further questions.


