Order custom post type by title

<?php	
function order_cpts($query) {
    if ( ! is_admin() && $query->is_post_type_archive('documentation')) {
        $query->set( 'orderby', 'title');
        $query->set( 'order', 'ASC');
    }
}
add_action( 'pre_get_posts', 'order_cpts' );

Can also remove ‘! is_admin’ to order in admin too:

<?php	
function order_cpts($query) {
    if ( $query->is_post_type_archive('documentation')) {
        $query->set( 'orderby', 'title');
        $query->set( 'order', 'ASC');
    }
}
add_action( 'pre_get_posts', 'order_cpts' );