There are probably several options to achieve your goal, below is one of the options shown by me.
(these 2 functions belong to each other)
Please make always a copy of
functions.php
before you start to edit/add a plugin or other code snippet.
/**
* Remove fields from an user profile page for all except Administrator
*
* FYI {@link https://codex.wordpress.org/Function_Reference/current_user_can}
* {@link https://codex.wordpress.org/Roles_and_Capabilities}
* {@link https://codex.wordpress.org/Plugin_API/Action_Reference/admin_footer}
* {@link https://developer.wordpress.org/reference/hooks/load-pagenow/}
*
* Checked with @version WordPress 4.8
*/
add_action('admin_init', 'wpse273289_remove_profile_fields' );
function wpse273289_remove_profile_fields()
{
global $pagenow;
// apply only to user profile or user edit pages
if( $pagenow !=='profile.php' && $pagenow !=='user-edit.php' )
{
return;
}
// Make it happen for all except Administrators
if( current_user_can( 'manage_options' ) )
{
return;
}
add_action( 'admin_footer', 'wpse273289_remove_profile_fields_js' );
}
/**
* Remove (below)selected fields on user profile
* This function belongs to the wpse273289_remove_profile_fields function!
*
*/
function wpse273289_remove_profile_fields_js()
{
?>
<script>
jQuery(document).ready( function($) {
$('input#user_login').closest('tr').remove(); // Username
$('input#first_name').closest('tr').remove(); // First Name
$('input#nickname').closest('tr').remove(); // Nickname (required)
$('input#email').closest('tr').remove(); // Email (required)
});
</script>
<?php
}
The fields above in the script are just examples so please adjust to your own preference.
Both functions are checked in a local sandbox and working for me.Note: above is NOT tested with ACF plugin but that should not be a problem.