404 on Pages for Custom Post Type & Query_Posts

I’ve battled with a similar problem and came to the conclusion that you can’t order by multiple meta values properly using pre_get_posts.

However in your case the solution might actually be very simple. All you need to do is combine the season number with the episode number into a single number.

I don’t know how the user enters these values, but if its done via a custom meta box, then this can be done easily on the function that saves the custom meta values to the database.

Once you’ve prepared the data this way, you only need to orderby by meta_value_num via pre_get_posts. Like this you won’t have to use query_posts() and the pagination and other functionalities will work as expected.

tech