Order Custom Post Type Archive by multiple values in functions.php

Have you consulted the Codex WP_Query() entry?

To query by custom field, you’ll need to add tax query parameters to your query args.

e.g.

'meta_key' => 'foobar'

To sort, you’ll need to add sort and orderby query parameters to your query args.

e.g.

'order' => 'ASC',
'orderby' => 'meta_val_num'

error code: 523