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.
Related Posts:
- Order Custom Post Type by Custom Field Value
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Multiple orderby values in WP_Query
- Search multiple custom fields by using meta_query
- Sort Order for a Custom Query in a Post Type Archive Not Working
- how to filter by last name for custom post
- Sorting a query by custom field date
- How can I generate a RSS feed based on a custom WP_Query?
- Filtering a WP Query result
- Display Custom Post Type Fields
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- How to sort CPT by custom meta value (date), and return posts month by month
- List upcoming events, ordered by date in a custom field
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- WordPress query by multiple Custom fields and order by date
- WP_Query post at custom position
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- WP Query group/order by category name
- query order by date on custom type: wrong order
- Re-order posts in query after
- Display custom post types with custom date field value (before today) & order by custom date field
- How to query different post types in specific order?
- Conditional to modify query results
- wp_query to find posts by year and month
- How to dynamically attach pictures to a carousel
- Get all Posts If has same custom field values in Posts
- Custom Post type and Custom Field WP_Query
- Including Custom Meta with posts_where query
- Combining sorted and random CPT
- WP_Query: include custom post type only with specific meta value
- WordPress custom loop filter by meta_key and value with serialize data
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Rewrite and custom post type: order by custom field not working
- wp_query check if integer exists in custom field’s array
- Wp_query: sort by PHP variable
- How can I get the number of custom post type posts that have a specific attachment image set?
- Problem querying Custom post type by custom fields
- Orderby CPT custom fields not working
- Query custom post type with ACF Date
- Including metaboxes from custom post types in global search — continued
- Query Multiple Custom Posts by Custom Fields
- First custom field value (out of several) displayed twice after query
- Change sort order when using ‘orderby’ => ‘type’
- Possible to filter custom post type with multiple meta data?
- Add a custom meta box for client to order CPT posts how they want
- WP Query ‘posts_per_page’
- How to get specific post meta by title or id
- WP_Query orderby not work with meta_key
- WP_Query of custom post type sorted by meta_key has unexpected results
- Group by custom field value (start and end times)
- Post ordering not working with custom field
- Filtered by a custom field, ordered by another
- Cache issue with WP_Query and custom field filtering
- Displaying Portfolio Filter by Category Order (alphabetically)
- How do I list a custom field and custom taxonomies for each result in a loop?
- Custom Form / Search with Custom Post Type Data
- Alike Shortcode using in Custom Shortcode
- Query custom post type that has a serialized relational advanced custom field value
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- How can I sort the results of a REST API response by the title of a connected custom post type?
- WP_Query get always custom post_type for first
- Sort custom post column by generated value?
- How can I query and sort custom-post type using WP_Query
- Filter posts by their related field’s custom field
- Query custom post type and custom field by URL parameters
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Query a Custom Post Type using SELECT that has ACF fields to compare dates
- meta query multiple values for the same key
- Sort custom post archives by a meta value from a different custom post type?
- Custom post types – meta_query: search lesson which starts sooner
- Wp Query sort order from custom MetaBox
- Post Filtered by Custom Field Value
- Filter custom WP_Query by first letter of a custom field – hopefully using Search and Filter Pro?
- sorting in wp query based on custom field value
- Meta_Query refuses to return results
- What’s the most efficient way to get two queries based on an if statement?
- WordPress query in which condition uses custom field
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- Error in WP Query. If variable is empty it is displaying previous post value
- Query events post type after current date and timezone
- Show first posts with custom field not empty and order all by title
- Orderby modified only for specific post types
- Custom post order when using OR relation
- How to stop wp_query searching pages as well as the specified CPT
- How to display custom post type ordered by a custom field date
- Selecting posts older than the current Unix epoch timestamp
- WP_Query and two custom fields returns no posts
- Storing/querying custom date data
- Query recent posts by author
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Show Posts in Vertical Tabs with Scrollbar
- How to show all posts of specific custom post type with their custom fields values?
- querying to custom field over ACF REST API
- Order Wp Query by earliest of 3 dates meta query
- Display ACF object field data using Elementor Custom Query
- WordPress custom field sorting, weird behavior: the latest post is at the end
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?