I'm using the following filter in order to increase the amount of posts shown on category templates from 10 to 30 (I want to keep 10 for the rest of the site)
// Modify number of results shown
function modify_query_amount_shown($query){
if ($query->is_category) {
$query->set('posts_per_page', 30);
$query->set('orderby', 'menu_order');
}
return $query;
}
add_filter('pre_get_posts', 'modify_query_amount_shown');
However, when I refresh my page several times, I notice the order of my posts changes each time. I can confirm that it has something to do with this code, because as soon as I comment it out, it returns to normal.