What Pieter Goosen said is exactly what you need to get this working.
pre_get_posts
is a very powerful function which is used to modify default behavior of main WordPress query. This hook is called after the query variable object is created, but before the actual query is run.
With pre_get_posts
we will check for author query and change order
and orderby
parameters in it. This will make posts on author archive pages appear in alphabetical order instead of default post date.
function wpse_show_alphabetical_posts( $query ) {
// no affect on admin or other queries
if ( is_admin() || ! $query->is_main_query() )
return;
// if it's an author query
if ( $query->is_author() ) {
// change order and orderby parameters
$query->set( 'orderby', 'title' );
$query->set( 'order', 'ASC' );
}
}
add_action( 'pre_get_posts', 'wpse_show_alphabetical_posts', 1 );
You should check pre_get_posts
documentation on codex for more information.