functions.phpに以下を追加します。
add_filter('pre_user_display_name','default_display_name'); function default_display_name($name) { if ( isset( $_POST['last_name'] ) || isset( $_POST['first_name'] ) ) { $name = sanitize_text_field( $_POST['last_name'] ) . sanitize_text_field( $_POST['first_name'] ); } return $name; }