Four changes to your script. Limit $users to users with ‘administrator’ role. Removed line if($user->caps['Administrator']!=1) continue; as every user is an administrator. Changed ‘post_per_page’ to -1, to process all posts. Added wp_reset_postdata(); after each loop:
$users = get_users( array( 'role' => 'administrator' ) );
foreach ( $users as $user ) {
$query = new WP_Query( array(
'posts_per_page'=>-1,
'author' => $user->ID
)
);
if( $query->have_posts() ) {
while( $query->have_posts() ) {
$query->the_post();
get_template_part('content', 'postlist');
}
} else {
get_template_part('content', 'none');
}
wp_reset_postdata();
}
Make sure that you reach right template in get_template_part('content', 'postlist'); statement.