You can modify all main queries before they happen via the pre_get_posts
action and a check if is_main_query
:
function wpa75492_post_type_query( $query ) {
if ( $query->is_main_query() ) {
$query->set( 'post_type', array( 'book' ) );
}
}
add_action( 'pre_get_posts', 'wpa75492_post_type_query' );