Support

Account

Home Forums General Issues Allow roles to be set to certain users Reply To: Allow roles to be set to certain users

  • Cool thanks Elliot, so do I just drop this bit of code into my functions.php file in my theme? Do I need to write any of the code from the acf/load_field filter resources link?

    Is there a tweak to the code you have above that can still make the fields visible/editable by admin. So:

    
    // compare and completely remove field if this user is not meant to see it! Unless they are admin, then always show it
    	if( $current_user_name != $user {but do show if the user is admin} )
    	{
    		$field = null;
    	}
    	
    	
    	return $field;
    }
    

    Really appreciate your help!!!