Support

Account

Home Forums General Issues User Field Order Reply To: User Field Order

  • Hi @nickfmc

    Just wanted to let you know I have pushed an update to github containing a filter for the user field $args.

    You can hook in and modify them like so:

    
    <?php 
    
    function my_acf_user_query( $args, $field, $post_id ) {
    	
    	// http://codex.wordpress.org/Function_Reference/get_users
    	$args['orderby'] = 'nicename';
    	
    	return $args;
    }
    
    add_filter('acf/fields/user/query/name=CUSTOM_FIELD_NAME', 'my_acf_user_query', 10, 3 );
    
    ?>
    

    You can also remove the /name=CUSTOM_FIELD_NAME for this to run on all user fields.

    Thanks
    E