WordPress Comments – Only show part of user name

You have to dive into comment template in your theme and find out the line where username is printed. Then use the following function in functions.php:

function alter_username( $username ){
    return substr( $username, 0, 1 ). str_repeat( '*', strlen( $username ) - 2 ) . substr( $username, strlen( $username ) - 1 ,1 );
}

Then use the function in comment template or wherever you want to show altered username like:

echo alter_username( $username );

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.